Commit dfb7dac3 authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Linus Torvalds
Browse files

[PATCH] unify sys_ptrace prototype



Make sure we always return, as all syscalls should.  Also move the common
prototype to <linux/syscalls.h>
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Signed-off-by: default avatarMiklos Szeredi <miklos@szeredi.hu>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 7024a9b8
......@@ -782,7 +782,7 @@ static int do_ptrace(int request, struct task_struct *child, long addr, long dat
return ret;
}
asmlinkage int sys_ptrace(long request, long pid, long addr, long data)
asmlinkage long sys_ptrace(long request, long pid, long addr, long data)
{
struct task_struct *child;
int ret;
......
......@@ -665,7 +665,7 @@ static int do_ptrace(int request, struct task_struct *child, long addr, long dat
return ret;
}
asmlinkage int sys_ptrace(long request, long pid, long addr, long data)
asmlinkage long sys_ptrace(long request, long pid, long addr, long data)
{
struct task_struct *child;
int ret;
......
......@@ -106,7 +106,7 @@ void ptrace_enable(struct task_struct *child)
child->thread.frame0->__status |= REG__STATUS_STEP;
}
asmlinkage int sys_ptrace(long request, long pid, long addr, long data)
asmlinkage long sys_ptrace(long request, long pid, long addr, long data)
{
struct task_struct *child;
unsigned long tmp;
......
......@@ -57,7 +57,7 @@ void ptrace_disable(struct task_struct *child)
h8300_disable_trace(child);
}
asmlinkage int sys_ptrace(long request, long pid, long addr, long data)
asmlinkage long sys_ptrace(long request, long pid, long addr, long data)
{
struct task_struct *child;
int ret;
......
......@@ -354,7 +354,7 @@ ptrace_set_thread_area(struct task_struct *child,
return 0;
}
asmlinkage int sys_ptrace(long request, long pid, long addr, long data)
asmlinkage long sys_ptrace(long request, long pid, long addr, long data)
{
struct task_struct *child;
struct user * dummy = NULL;
......
......@@ -36,6 +36,7 @@
#include <linux/uio.h>
#include <linux/nfs_fs.h>
#include <linux/quota.h>
#include <linux/syscalls.h>
#include <linux/sunrpc/svc.h>
#include <linux/nfsd/nfsd.h>
#include <linux/nfsd/cache.h>
......
......@@ -756,7 +756,7 @@ do_ptrace(long request, struct task_struct *child, long addr, long data)
return ret;
}
asmlinkage int sys_ptrace(long request, long pid, long addr, long data)
asmlinkage long sys_ptrace(long request, long pid, long addr, long data)
{
struct task_struct *child;
int ret;
......
......@@ -121,7 +121,7 @@ void ptrace_disable(struct task_struct *child)
child->thread.work.syscall_trace = 0;
}
asmlinkage int sys_ptrace(long request, long pid, long addr, long data)
asmlinkage long sys_ptrace(long request, long pid, long addr, long data)
{
struct task_struct *child;
unsigned long tmp;
......
......@@ -101,7 +101,7 @@ void ptrace_disable(struct task_struct *child)
put_reg(child, PT_SR, tmp);
}
asmlinkage int sys_ptrace(long request, long pid, long addr, long data)
asmlinkage long sys_ptrace(long request, long pid, long addr, long data)
{
struct task_struct *child;
int ret;
......
......@@ -174,7 +174,7 @@ int ptrace_setfpregs (struct task_struct *child, __u32 __user *data)
return 0;
}
asmlinkage int sys_ptrace(long request, long pid, long addr, long data)
asmlinkage long sys_ptrace(long request, long pid, long addr, long data)
{
struct task_struct *child;
int ret;
......
......@@ -240,7 +240,7 @@ void ptrace_disable(struct task_struct *child)
clear_single_step(child);
}
int sys_ptrace(long request, long pid, long addr, long data)
long sys_ptrace(long request, long pid, long addr, long data)
{
struct task_struct *child;
int ret = -EPERM;
......
......@@ -53,7 +53,7 @@ void ptrace_disable(struct task_struct *child)
clear_single_step(child);
}
int sys_ptrace(long request, long pid, long addr, long data)
long sys_ptrace(long request, long pid, long addr, long data)
{
struct task_struct *child;
int ret = -EPERM;
......
......@@ -80,7 +80,7 @@ void ptrace_disable(struct task_struct *child)
/* nothing to do.. */
}
asmlinkage int sys_ptrace(long request, long pid, long addr, long data)
asmlinkage long sys_ptrace(long request, long pid, long addr, long data)
{
struct task_struct *child;
struct user * dummy = NULL;
......
......@@ -121,7 +121,7 @@ put_fpu_long(struct task_struct *task, unsigned long addr, unsigned long data)
return 0;
}
asmlinkage int sys_ptrace(long request, long pid, long addr, long data)
asmlinkage long sys_ptrace(long request, long pid, long addr, long data)
{
struct task_struct *child;
extern void poke_real_address_q(unsigned long long addr, unsigned long long data);
......
......@@ -11,7 +11,6 @@ typedef long syscall_handler_t(struct pt_regs);
/* Not declared on x86, incompatible declarations on x86_64, so these have
* to go here rather than in sys_call_table.c
*/
extern syscall_handler_t sys_ptrace;
extern syscall_handler_t sys_rt_sigaction;
extern syscall_handler_t old_mmap_i386;
......
......@@ -113,7 +113,7 @@ static int set_single_step (struct task_struct *t, int val)
return 1;
}
int sys_ptrace(long request, long pid, long addr, long data)
long sys_ptrace(long request, long pid, long addr, long data)
{
struct task_struct *child;
int rval;
......
......@@ -45,7 +45,7 @@ void ptrace_disable(struct task_struct *child)
/* Nothing to do.. */
}
int sys_ptrace(long request, long pid, long addr, long data)
long sys_ptrace(long request, long pid, long addr, long data)
{
struct task_struct *child;
int ret = -EPERM;
......
......@@ -544,7 +544,6 @@ asmlinkage int sys_clone(unsigned long clone_flags, unsigned long newsp,
asmlinkage int sys_fork(struct pt_regs *regs);
asmlinkage int sys_vfork(struct pt_regs *regs);
asmlinkage int sys_pipe(unsigned long *fildes);
asmlinkage int sys_ptrace(long request, long pid, long addr, long data);
struct sigaction;
asmlinkage long sys_rt_sigaction(int sig,
const struct sigaction __user *act,
......
......@@ -480,7 +480,6 @@ asmlinkage int sys_clone(unsigned long clone_flags, unsigned long newsp,
asmlinkage int sys_fork(struct pt_regs *regs);
asmlinkage int sys_vfork(struct pt_regs *regs);
asmlinkage int sys_pipe(unsigned long *fildes);
asmlinkage int sys_ptrace(long request, long pid, long addr, long data);
struct sigaction;
asmlinkage long sys_rt_sigaction(int sig,
const struct sigaction __user *act,
......
......@@ -367,7 +367,6 @@ asmlinkage int sys_fork(long r10, long r11, long r12, long r13,
asmlinkage int sys_vfork(long r10, long r11, long r12, long r13,
long mof, long srp, struct pt_regs *regs);
asmlinkage int sys_pipe(unsigned long __user *fildes);
asmlinkage int sys_ptrace(long request, long pid, long addr, long data);
struct sigaction;
asmlinkage long sys_rt_sigaction(int sig,
const struct sigaction __user *act,
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment