aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2005-10-30 18:02:22 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2005-10-30 20:37:20 -0500
commitdfb7dac3af623a68262536437af008ed6aba4d88 (patch)
treefdc8a61c73257dcf8866cf7b9213ce78d2422e7f
parent7024a9b884ed7657fb873e655cd124d85ae792a4 (diff)
[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: Christoph Hellwig <hch@lst.de> Signed-off-by: Miklos Szeredi <miklos@szeredi.hu> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r--arch/arm/kernel/ptrace.c2
-rw-r--r--arch/arm26/kernel/ptrace.c2
-rw-r--r--arch/frv/kernel/ptrace.c2
-rw-r--r--arch/h8300/kernel/ptrace.c2
-rw-r--r--arch/i386/kernel/ptrace.c2
-rw-r--r--arch/ia64/ia32/sys_ia32.c1
-rw-r--r--arch/m32r/kernel/ptrace.c2
-rw-r--r--arch/m68k/kernel/ptrace.c2
-rw-r--r--arch/m68knommu/kernel/ptrace.c2
-rw-r--r--arch/mips/kernel/ptrace.c2
-rw-r--r--arch/ppc/kernel/ptrace.c2
-rw-r--r--arch/ppc64/kernel/ptrace.c2
-rw-r--r--arch/sh/kernel/ptrace.c2
-rw-r--r--arch/sh64/kernel/ptrace.c2
-rw-r--r--arch/um/include/sysdep-i386/syscalls.h1
-rw-r--r--arch/v850/kernel/ptrace.c2
-rw-r--r--arch/xtensa/kernel/ptrace.c2
-rw-r--r--include/asm-arm/unistd.h1
-rw-r--r--include/asm-arm26/unistd.h1
-rw-r--r--include/asm-cris/unistd.h1
-rw-r--r--include/asm-h8300/unistd.h1
-rw-r--r--include/asm-i386/unistd.h1
-rw-r--r--include/asm-ia64/unistd.h2
-rw-r--r--include/asm-m32r/unistd.h1
-rw-r--r--include/asm-m68k/unistd.h1
-rw-r--r--include/asm-m68knommu/unistd.h1
-rw-r--r--include/asm-mips/unistd.h1
-rw-r--r--include/asm-ppc/unistd.h1
-rw-r--r--include/asm-ppc64/unistd.h1
-rw-r--r--include/asm-s390/unistd.h1
-rw-r--r--include/asm-sh/unistd.h1
-rw-r--r--include/asm-v850/unistd.h1
-rw-r--r--include/asm-x86_64/unistd.h2
-rw-r--r--include/linux/syscalls.h1
34 files changed, 17 insertions, 34 deletions
diff --git a/arch/arm/kernel/ptrace.c b/arch/arm/kernel/ptrace.c
index cd99b83f14c2..9bd8609a2926 100644
--- a/arch/arm/kernel/ptrace.c
+++ b/arch/arm/kernel/ptrace.c
@@ -782,7 +782,7 @@ static int do_ptrace(int request, struct task_struct *child, long addr, long dat
782 return ret; 782 return ret;
783} 783}
784 784
785asmlinkage int sys_ptrace(long request, long pid, long addr, long data) 785asmlinkage long sys_ptrace(long request, long pid, long addr, long data)
786{ 786{
787 struct task_struct *child; 787 struct task_struct *child;
788 int ret; 788 int ret;
diff --git a/arch/arm26/kernel/ptrace.c b/arch/arm26/kernel/ptrace.c
index 8a52124de0e1..cf7e977d18c8 100644
--- a/arch/arm26/kernel/ptrace.c
+++ b/arch/arm26/kernel/ptrace.c
@@ -665,7 +665,7 @@ static int do_ptrace(int request, struct task_struct *child, long addr, long dat
665 return ret; 665 return ret;
666} 666}
667 667
668asmlinkage int sys_ptrace(long request, long pid, long addr, long data) 668asmlinkage long sys_ptrace(long request, long pid, long addr, long data)
669{ 669{
670 struct task_struct *child; 670 struct task_struct *child;
671 int ret; 671 int ret;
diff --git a/arch/frv/kernel/ptrace.c b/arch/frv/kernel/ptrace.c
index cbe03cba9f02..cb335a14a315 100644
--- a/arch/frv/kernel/ptrace.c
+++ b/arch/frv/kernel/ptrace.c
@@ -106,7 +106,7 @@ void ptrace_enable(struct task_struct *child)
106 child->thread.frame0->__status |= REG__STATUS_STEP; 106 child->thread.frame0->__status |= REG__STATUS_STEP;
107} 107}
108 108
109asmlinkage int sys_ptrace(long request, long pid, long addr, long data) 109asmlinkage long sys_ptrace(long request, long pid, long addr, long data)
110{ 110{
111 struct task_struct *child; 111 struct task_struct *child;
112 unsigned long tmp; 112 unsigned long tmp;
diff --git a/arch/h8300/kernel/ptrace.c b/arch/h8300/kernel/ptrace.c
index 05c15e869777..a569fe4aa284 100644
--- a/arch/h8300/kernel/ptrace.c
+++ b/arch/h8300/kernel/ptrace.c
@@ -57,7 +57,7 @@ void ptrace_disable(struct task_struct *child)
57 h8300_disable_trace(child); 57 h8300_disable_trace(child);
58} 58}
59 59
60asmlinkage int sys_ptrace(long request, long pid, long addr, long data) 60asmlinkage long sys_ptrace(long request, long pid, long addr, long data)
61{ 61{
62 struct task_struct *child; 62 struct task_struct *child;
63 int ret; 63 int ret;
diff --git a/arch/i386/kernel/ptrace.c b/arch/i386/kernel/ptrace.c
index 7b6368bf8974..efd11f09c996 100644
--- a/arch/i386/kernel/ptrace.c
+++ b/arch/i386/kernel/ptrace.c
@@ -354,7 +354,7 @@ ptrace_set_thread_area(struct task_struct *child,
354 return 0; 354 return 0;
355} 355}
356 356
357asmlinkage int sys_ptrace(long request, long pid, long addr, long data) 357asmlinkage long sys_ptrace(long request, long pid, long addr, long data)
358{ 358{
359 struct task_struct *child; 359 struct task_struct *child;
360 struct user * dummy = NULL; 360 struct user * dummy = NULL;
diff --git a/arch/ia64/ia32/sys_ia32.c b/arch/ia64/ia32/sys_ia32.c
index 3fa67ecebc83..dc282710421a 100644
--- a/arch/ia64/ia32/sys_ia32.c
+++ b/arch/ia64/ia32/sys_ia32.c
@@ -36,6 +36,7 @@
36#include <linux/uio.h> 36#include <linux/uio.h>
37#include <linux/nfs_fs.h> 37#include <linux/nfs_fs.h>
38#include <linux/quota.h> 38#include <linux/quota.h>
39#include <linux/syscalls.h>
39#include <linux/sunrpc/svc.h> 40#include <linux/sunrpc/svc.h>
40#include <linux/nfsd/nfsd.h> 41#include <linux/nfsd/nfsd.h>
41#include <linux/nfsd/cache.h> 42#include <linux/nfsd/cache.h>
diff --git a/arch/m32r/kernel/ptrace.c b/arch/m32r/kernel/ptrace.c
index 124f7c1b775e..078d2a0e71c2 100644
--- a/arch/m32r/kernel/ptrace.c
+++ b/arch/m32r/kernel/ptrace.c
@@ -756,7 +756,7 @@ do_ptrace(long request, struct task_struct *child, long addr, long data)
756 return ret; 756 return ret;
757} 757}
758 758
759asmlinkage int sys_ptrace(long request, long pid, long addr, long data) 759asmlinkage long sys_ptrace(long request, long pid, long addr, long data)
760{ 760{
761 struct task_struct *child; 761 struct task_struct *child;
762 int ret; 762 int ret;
diff --git a/arch/m68k/kernel/ptrace.c b/arch/m68k/kernel/ptrace.c
index 8ed1b01a6a87..f7f1d2e5b90b 100644
--- a/arch/m68k/kernel/ptrace.c
+++ b/arch/m68k/kernel/ptrace.c
@@ -121,7 +121,7 @@ void ptrace_disable(struct task_struct *child)
121 child->thread.work.syscall_trace = 0; 121 child->thread.work.syscall_trace = 0;
122} 122}
123 123
124asmlinkage int sys_ptrace(long request, long pid, long addr, long data) 124asmlinkage long sys_ptrace(long request, long pid, long addr, long data)
125{ 125{
126 struct task_struct *child; 126 struct task_struct *child;
127 unsigned long tmp; 127 unsigned long tmp;
diff --git a/arch/m68knommu/kernel/ptrace.c b/arch/m68knommu/kernel/ptrace.c
index 9724e1cd82e5..621d7b91ccfe 100644
--- a/arch/m68knommu/kernel/ptrace.c
+++ b/arch/m68knommu/kernel/ptrace.c
@@ -101,7 +101,7 @@ void ptrace_disable(struct task_struct *child)
101 put_reg(child, PT_SR, tmp); 101 put_reg(child, PT_SR, tmp);
102} 102}
103 103
104asmlinkage int sys_ptrace(long request, long pid, long addr, long data) 104asmlinkage long sys_ptrace(long request, long pid, long addr, long data)
105{ 105{
106 struct task_struct *child; 106 struct task_struct *child;
107 int ret; 107 int ret;
diff --git a/arch/mips/kernel/ptrace.c b/arch/mips/kernel/ptrace.c
index fcceab8f2e00..f1b0f3e1f95b 100644
--- a/arch/mips/kernel/ptrace.c
+++ b/arch/mips/kernel/ptrace.c
@@ -174,7 +174,7 @@ int ptrace_setfpregs (struct task_struct *child, __u32 __user *data)
174 return 0; 174 return 0;
175} 175}
176 176
177asmlinkage int sys_ptrace(long request, long pid, long addr, long data) 177asmlinkage long sys_ptrace(long request, long pid, long addr, long data)
178{ 178{
179 struct task_struct *child; 179 struct task_struct *child;
180 int ret; 180 int ret;
diff --git a/arch/ppc/kernel/ptrace.c b/arch/ppc/kernel/ptrace.c
index e7aee4108dea..e2744b6879da 100644
--- a/arch/ppc/kernel/ptrace.c
+++ b/arch/ppc/kernel/ptrace.c
@@ -240,7 +240,7 @@ void ptrace_disable(struct task_struct *child)
240 clear_single_step(child); 240 clear_single_step(child);
241} 241}
242 242
243int sys_ptrace(long request, long pid, long addr, long data) 243long sys_ptrace(long request, long pid, long addr, long data)
244{ 244{
245 struct task_struct *child; 245 struct task_struct *child;
246 int ret = -EPERM; 246 int ret = -EPERM;
diff --git a/arch/ppc64/kernel/ptrace.c b/arch/ppc64/kernel/ptrace.c
index b1c044ca5756..b33073c31724 100644
--- a/arch/ppc64/kernel/ptrace.c
+++ b/arch/ppc64/kernel/ptrace.c
@@ -53,7 +53,7 @@ void ptrace_disable(struct task_struct *child)
53 clear_single_step(child); 53 clear_single_step(child);
54} 54}
55 55
56int sys_ptrace(long request, long pid, long addr, long data) 56long sys_ptrace(long request, long pid, long addr, long data)
57{ 57{
58 struct task_struct *child; 58 struct task_struct *child;
59 int ret = -EPERM; 59 int ret = -EPERM;
diff --git a/arch/sh/kernel/ptrace.c b/arch/sh/kernel/ptrace.c
index b28919b65682..1fbe5a428e31 100644
--- a/arch/sh/kernel/ptrace.c
+++ b/arch/sh/kernel/ptrace.c
@@ -80,7 +80,7 @@ void ptrace_disable(struct task_struct *child)
80 /* nothing to do.. */ 80 /* nothing to do.. */
81} 81}
82 82
83asmlinkage int sys_ptrace(long request, long pid, long addr, long data) 83asmlinkage long sys_ptrace(long request, long pid, long addr, long data)
84{ 84{
85 struct task_struct *child; 85 struct task_struct *child;
86 struct user * dummy = NULL; 86 struct user * dummy = NULL;
diff --git a/arch/sh64/kernel/ptrace.c b/arch/sh64/kernel/ptrace.c
index fd2000956dae..71f2eec00b99 100644
--- a/arch/sh64/kernel/ptrace.c
+++ b/arch/sh64/kernel/ptrace.c
@@ -121,7 +121,7 @@ put_fpu_long(struct task_struct *task, unsigned long addr, unsigned long data)
121 return 0; 121 return 0;
122} 122}
123 123
124asmlinkage int sys_ptrace(long request, long pid, long addr, long data) 124asmlinkage long sys_ptrace(long request, long pid, long addr, long data)
125{ 125{
126 struct task_struct *child; 126 struct task_struct *child;
127 extern void poke_real_address_q(unsigned long long addr, unsigned long long data); 127 extern void poke_real_address_q(unsigned long long addr, unsigned long long data);
diff --git a/arch/um/include/sysdep-i386/syscalls.h b/arch/um/include/sysdep-i386/syscalls.h
index a0d5b74d3731..57bd79efbee3 100644
--- a/arch/um/include/sysdep-i386/syscalls.h
+++ b/arch/um/include/sysdep-i386/syscalls.h
@@ -11,7 +11,6 @@ typedef long syscall_handler_t(struct pt_regs);
11/* Not declared on x86, incompatible declarations on x86_64, so these have 11/* Not declared on x86, incompatible declarations on x86_64, so these have
12 * to go here rather than in sys_call_table.c 12 * to go here rather than in sys_call_table.c
13 */ 13 */
14extern syscall_handler_t sys_ptrace;
15extern syscall_handler_t sys_rt_sigaction; 14extern syscall_handler_t sys_rt_sigaction;
16 15
17extern syscall_handler_t old_mmap_i386; 16extern syscall_handler_t old_mmap_i386;
diff --git a/arch/v850/kernel/ptrace.c b/arch/v850/kernel/ptrace.c
index 4726b87f5e5a..d6077ff47d22 100644
--- a/arch/v850/kernel/ptrace.c
+++ b/arch/v850/kernel/ptrace.c
@@ -113,7 +113,7 @@ static int set_single_step (struct task_struct *t, int val)
113 return 1; 113 return 1;
114} 114}
115 115
116int sys_ptrace(long request, long pid, long addr, long data) 116long sys_ptrace(long request, long pid, long addr, long data)
117{ 117{
118 struct task_struct *child; 118 struct task_struct *child;
119 int rval; 119 int rval;
diff --git a/arch/xtensa/kernel/ptrace.c b/arch/xtensa/kernel/ptrace.c
index 2659efdd4e99..14460743de07 100644
--- a/arch/xtensa/kernel/ptrace.c
+++ b/arch/xtensa/kernel/ptrace.c
@@ -45,7 +45,7 @@ void ptrace_disable(struct task_struct *child)
45 /* Nothing to do.. */ 45 /* Nothing to do.. */
46} 46}
47 47
48int sys_ptrace(long request, long pid, long addr, long data) 48long sys_ptrace(long request, long pid, long addr, long data)
49{ 49{
50 struct task_struct *child; 50 struct task_struct *child;
51 int ret = -EPERM; 51 int ret = -EPERM;
diff --git a/include/asm-arm/unistd.h b/include/asm-arm/unistd.h
index c49df635a80f..d626e70faded 100644
--- a/include/asm-arm/unistd.h
+++ b/include/asm-arm/unistd.h
@@ -544,7 +544,6 @@ asmlinkage int sys_clone(unsigned long clone_flags, unsigned long newsp,
544asmlinkage int sys_fork(struct pt_regs *regs); 544asmlinkage int sys_fork(struct pt_regs *regs);
545asmlinkage int sys_vfork(struct pt_regs *regs); 545asmlinkage int sys_vfork(struct pt_regs *regs);
546asmlinkage int sys_pipe(unsigned long *fildes); 546asmlinkage int sys_pipe(unsigned long *fildes);
547asmlinkage int sys_ptrace(long request, long pid, long addr, long data);
548struct sigaction; 547struct sigaction;
549asmlinkage long sys_rt_sigaction(int sig, 548asmlinkage long sys_rt_sigaction(int sig,
550 const struct sigaction __user *act, 549 const struct sigaction __user *act,
diff --git a/include/asm-arm26/unistd.h b/include/asm-arm26/unistd.h
index dfa0b0c30aa3..be4c2fb9c049 100644
--- a/include/asm-arm26/unistd.h
+++ b/include/asm-arm26/unistd.h
@@ -480,7 +480,6 @@ asmlinkage int sys_clone(unsigned long clone_flags, unsigned long newsp,
480asmlinkage int sys_fork(struct pt_regs *regs); 480asmlinkage int sys_fork(struct pt_regs *regs);
481asmlinkage int sys_vfork(struct pt_regs *regs); 481asmlinkage int sys_vfork(struct pt_regs *regs);
482asmlinkage int sys_pipe(unsigned long *fildes); 482asmlinkage int sys_pipe(unsigned long *fildes);
483asmlinkage int sys_ptrace(long request, long pid, long addr, long data);
484struct sigaction; 483struct sigaction;
485asmlinkage long sys_rt_sigaction(int sig, 484asmlinkage long sys_rt_sigaction(int sig,
486 const struct sigaction __user *act, 485 const struct sigaction __user *act,
diff --git a/include/asm-cris/unistd.h b/include/asm-cris/unistd.h
index 28232ad2ff34..156a34bfc583 100644
--- a/include/asm-cris/unistd.h
+++ b/include/asm-cris/unistd.h
@@ -367,7 +367,6 @@ asmlinkage int sys_fork(long r10, long r11, long r12, long r13,
367asmlinkage int sys_vfork(long r10, long r11, long r12, long r13, 367asmlinkage int sys_vfork(long r10, long r11, long r12, long r13,
368 long mof, long srp, struct pt_regs *regs); 368 long mof, long srp, struct pt_regs *regs);
369asmlinkage int sys_pipe(unsigned long __user *fildes); 369asmlinkage int sys_pipe(unsigned long __user *fildes);
370asmlinkage int sys_ptrace(long request, long pid, long addr, long data);
371struct sigaction; 370struct sigaction;
372asmlinkage long sys_rt_sigaction(int sig, 371asmlinkage long sys_rt_sigaction(int sig,
373 const struct sigaction __user *act, 372 const struct sigaction __user *act,
diff --git a/include/asm-h8300/unistd.h b/include/asm-h8300/unistd.h
index 56a6401886fa..56a4a5686c88 100644
--- a/include/asm-h8300/unistd.h
+++ b/include/asm-h8300/unistd.h
@@ -528,7 +528,6 @@ asmlinkage long sys_mmap2(unsigned long addr, unsigned long len,
528asmlinkage int sys_execve(char *name, char **argv, char **envp, 528asmlinkage int sys_execve(char *name, char **argv, char **envp,
529 int dummy, ...); 529 int dummy, ...);
530asmlinkage int sys_pipe(unsigned long *fildes); 530asmlinkage int sys_pipe(unsigned long *fildes);
531asmlinkage int sys_ptrace(long request, long pid, long addr, long data);
532struct sigaction; 531struct sigaction;
533asmlinkage long sys_rt_sigaction(int sig, 532asmlinkage long sys_rt_sigaction(int sig,
534 const struct sigaction __user *act, 533 const struct sigaction __user *act,
diff --git a/include/asm-i386/unistd.h b/include/asm-i386/unistd.h
index fbaf90a3968c..0f92e78dfea1 100644
--- a/include/asm-i386/unistd.h
+++ b/include/asm-i386/unistd.h
@@ -448,7 +448,6 @@ asmlinkage int sys_clone(struct pt_regs regs);
448asmlinkage int sys_fork(struct pt_regs regs); 448asmlinkage int sys_fork(struct pt_regs regs);
449asmlinkage int sys_vfork(struct pt_regs regs); 449asmlinkage int sys_vfork(struct pt_regs regs);
450asmlinkage int sys_pipe(unsigned long __user *fildes); 450asmlinkage int sys_pipe(unsigned long __user *fildes);
451asmlinkage int sys_ptrace(long request, long pid, long addr, long data);
452asmlinkage long sys_iopl(unsigned long unused); 451asmlinkage long sys_iopl(unsigned long unused);
453struct sigaction; 452struct sigaction;
454asmlinkage long sys_rt_sigaction(int sig, 453asmlinkage long sys_rt_sigaction(int sig,
diff --git a/include/asm-ia64/unistd.h b/include/asm-ia64/unistd.h
index 3a0c69524656..6d96a67439be 100644
--- a/include/asm-ia64/unistd.h
+++ b/include/asm-ia64/unistd.h
@@ -383,8 +383,6 @@ struct sigaction;
383long sys_execve(char __user *filename, char __user * __user *argv, 383long sys_execve(char __user *filename, char __user * __user *argv,
384 char __user * __user *envp, struct pt_regs *regs); 384 char __user * __user *envp, struct pt_regs *regs);
385asmlinkage long sys_pipe(void); 385asmlinkage long sys_pipe(void);
386asmlinkage long sys_ptrace(long request, pid_t pid,
387 unsigned long addr, unsigned long data);
388asmlinkage long sys_rt_sigaction(int sig, 386asmlinkage long sys_rt_sigaction(int sig,
389 const struct sigaction __user *act, 387 const struct sigaction __user *act,
390 struct sigaction __user *oact, 388 struct sigaction __user *oact,
diff --git a/include/asm-m32r/unistd.h b/include/asm-m32r/unistd.h
index 8552d8f45ab1..ac399e1f7bc0 100644
--- a/include/asm-m32r/unistd.h
+++ b/include/asm-m32r/unistd.h
@@ -452,7 +452,6 @@ asmlinkage int sys_clone(struct pt_regs regs);
452asmlinkage int sys_fork(struct pt_regs regs); 452asmlinkage int sys_fork(struct pt_regs regs);
453asmlinkage int sys_vfork(struct pt_regs regs); 453asmlinkage int sys_vfork(struct pt_regs regs);
454asmlinkage int sys_pipe(unsigned long __user *fildes); 454asmlinkage int sys_pipe(unsigned long __user *fildes);
455asmlinkage int sys_ptrace(long request, long pid, long addr, long data);
456struct sigaction; 455struct sigaction;
457asmlinkage long sys_rt_sigaction(int sig, 456asmlinkage long sys_rt_sigaction(int sig,
458 const struct sigaction __user *act, 457 const struct sigaction __user *act,
diff --git a/include/asm-m68k/unistd.h b/include/asm-m68k/unistd.h
index cbabde4f8a45..c2554bcd1747 100644
--- a/include/asm-m68k/unistd.h
+++ b/include/asm-m68k/unistd.h
@@ -444,7 +444,6 @@ asmlinkage long sys_mmap2(
444 unsigned long fd, unsigned long pgoff); 444 unsigned long fd, unsigned long pgoff);
445asmlinkage int sys_execve(char *name, char **argv, char **envp); 445asmlinkage int sys_execve(char *name, char **argv, char **envp);
446asmlinkage int sys_pipe(unsigned long *fildes); 446asmlinkage int sys_pipe(unsigned long *fildes);
447asmlinkage int sys_ptrace(long request, long pid, long addr, long data);
448struct pt_regs; 447struct pt_regs;
449struct sigaction; 448struct sigaction;
450asmlinkage long sys_rt_sigaction(int sig, 449asmlinkage long sys_rt_sigaction(int sig,
diff --git a/include/asm-m68knommu/unistd.h b/include/asm-m68knommu/unistd.h
index 84b6fa14459f..5373988a7e51 100644
--- a/include/asm-m68knommu/unistd.h
+++ b/include/asm-m68knommu/unistd.h
@@ -504,7 +504,6 @@ asmlinkage long sys_mmap2(unsigned long addr, unsigned long len,
504 unsigned long fd, unsigned long pgoff); 504 unsigned long fd, unsigned long pgoff);
505asmlinkage int sys_execve(char *name, char **argv, char **envp); 505asmlinkage int sys_execve(char *name, char **argv, char **envp);
506asmlinkage int sys_pipe(unsigned long *fildes); 506asmlinkage int sys_pipe(unsigned long *fildes);
507asmlinkage int sys_ptrace(long request, long pid, long addr, long data);
508struct pt_regs; 507struct pt_regs;
509int sys_request_irq(unsigned int, 508int sys_request_irq(unsigned int,
510 irqreturn_t (*)(int, void *, struct pt_regs *), 509 irqreturn_t (*)(int, void *, struct pt_regs *),
diff --git a/include/asm-mips/unistd.h b/include/asm-mips/unistd.h
index c9eaf4c104de..89ea8b60e945 100644
--- a/include/asm-mips/unistd.h
+++ b/include/asm-mips/unistd.h
@@ -1177,7 +1177,6 @@ asmlinkage long sys_mmap2(
1177 unsigned long fd, unsigned long pgoff); 1177 unsigned long fd, unsigned long pgoff);
1178asmlinkage int sys_execve(nabi_no_regargs struct pt_regs regs); 1178asmlinkage int sys_execve(nabi_no_regargs struct pt_regs regs);
1179asmlinkage int sys_pipe(nabi_no_regargs struct pt_regs regs); 1179asmlinkage int sys_pipe(nabi_no_regargs struct pt_regs regs);
1180asmlinkage int sys_ptrace(long request, long pid, long addr, long data);
1181struct sigaction; 1180struct sigaction;
1182asmlinkage long sys_rt_sigaction(int sig, 1181asmlinkage long sys_rt_sigaction(int sig,
1183 const struct sigaction __user *act, 1182 const struct sigaction __user *act,
diff --git a/include/asm-ppc/unistd.h b/include/asm-ppc/unistd.h
index 3173ab3d2eb9..404c143e643d 100644
--- a/include/asm-ppc/unistd.h
+++ b/include/asm-ppc/unistd.h
@@ -469,7 +469,6 @@ int sys_fork(int p1, int p2, int p3, int p4, int p5, int p6,
469int sys_vfork(int p1, int p2, int p3, int p4, int p5, int p6, 469int sys_vfork(int p1, int p2, int p3, int p4, int p5, int p6,
470 struct pt_regs *regs); 470 struct pt_regs *regs);
471int sys_pipe(int __user *fildes); 471int sys_pipe(int __user *fildes);
472int sys_ptrace(long request, long pid, long addr, long data);
473struct sigaction; 472struct sigaction;
474long sys_rt_sigaction(int sig, 473long sys_rt_sigaction(int sig,
475 const struct sigaction __user *act, 474 const struct sigaction __user *act,
diff --git a/include/asm-ppc64/unistd.h b/include/asm-ppc64/unistd.h
index 977bc980c1af..6b5fcbadbc5b 100644
--- a/include/asm-ppc64/unistd.h
+++ b/include/asm-ppc64/unistd.h
@@ -467,7 +467,6 @@ int sys_vfork(unsigned long p1, unsigned long p2, unsigned long p3,
467 unsigned long p4, unsigned long p5, unsigned long p6, 467 unsigned long p4, unsigned long p5, unsigned long p6,
468 struct pt_regs *regs); 468 struct pt_regs *regs);
469int sys_pipe(int __user *fildes); 469int sys_pipe(int __user *fildes);
470int sys_ptrace(long request, long pid, long addr, long data);
471struct sigaction; 470struct sigaction;
472long sys_rt_sigaction(int sig, const struct sigaction __user *act, 471long sys_rt_sigaction(int sig, const struct sigaction __user *act,
473 struct sigaction __user *oact, size_t sigsetsize); 472 struct sigaction __user *oact, size_t sigsetsize);
diff --git a/include/asm-s390/unistd.h b/include/asm-s390/unistd.h
index 221e965da924..f97d92691f17 100644
--- a/include/asm-s390/unistd.h
+++ b/include/asm-s390/unistd.h
@@ -590,7 +590,6 @@ asmlinkage long sys_clone(struct pt_regs regs);
590asmlinkage long sys_fork(struct pt_regs regs); 590asmlinkage long sys_fork(struct pt_regs regs);
591asmlinkage long sys_vfork(struct pt_regs regs); 591asmlinkage long sys_vfork(struct pt_regs regs);
592asmlinkage long sys_pipe(unsigned long __user *fildes); 592asmlinkage long sys_pipe(unsigned long __user *fildes);
593asmlinkage long sys_ptrace(long request, long pid, long addr, long data);
594struct sigaction; 593struct sigaction;
595asmlinkage long sys_rt_sigaction(int sig, 594asmlinkage long sys_rt_sigaction(int sig,
596 const struct sigaction __user *act, 595 const struct sigaction __user *act,
diff --git a/include/asm-sh/unistd.h b/include/asm-sh/unistd.h
index ea89e8f223ea..f2c8e14d1fd9 100644
--- a/include/asm-sh/unistd.h
+++ b/include/asm-sh/unistd.h
@@ -503,7 +503,6 @@ asmlinkage int sys_vfork(unsigned long r4, unsigned long r5,
503asmlinkage int sys_pipe(unsigned long r4, unsigned long r5, 503asmlinkage int sys_pipe(unsigned long r4, unsigned long r5,
504 unsigned long r6, unsigned long r7, 504 unsigned long r6, unsigned long r7,
505 struct pt_regs regs); 505 struct pt_regs regs);
506asmlinkage int sys_ptrace(long request, long pid, long addr, long data);
507asmlinkage ssize_t sys_pread_wrapper(unsigned int fd, char *buf, 506asmlinkage ssize_t sys_pread_wrapper(unsigned int fd, char *buf,
508 size_t count, long dummy, loff_t pos); 507 size_t count, long dummy, loff_t pos);
509asmlinkage ssize_t sys_pwrite_wrapper(unsigned int fd, const char *buf, 508asmlinkage ssize_t sys_pwrite_wrapper(unsigned int fd, const char *buf,
diff --git a/include/asm-v850/unistd.h b/include/asm-v850/unistd.h
index 3b552096c0e8..5a86f8e976ec 100644
--- a/include/asm-v850/unistd.h
+++ b/include/asm-v850/unistd.h
@@ -452,7 +452,6 @@ unsigned long sys_mmap2(unsigned long addr, size_t len,
452struct pt_regs; 452struct pt_regs;
453int sys_execve (char *name, char **argv, char **envp, struct pt_regs *regs); 453int sys_execve (char *name, char **argv, char **envp, struct pt_regs *regs);
454int sys_pipe (int *fildes); 454int sys_pipe (int *fildes);
455int sys_ptrace(long request, long pid, long addr, long data);
456struct sigaction; 455struct sigaction;
457asmlinkage long sys_rt_sigaction(int sig, 456asmlinkage long sys_rt_sigaction(int sig,
458 const struct sigaction __user *act, 457 const struct sigaction __user *act,
diff --git a/include/asm-x86_64/unistd.h b/include/asm-x86_64/unistd.h
index 11ba931cf82f..3c494b65d33a 100644
--- a/include/asm-x86_64/unistd.h
+++ b/include/asm-x86_64/unistd.h
@@ -780,8 +780,6 @@ asmlinkage long sys_pipe(int *fildes);
780#include <linux/types.h> 780#include <linux/types.h>
781#include <asm/ptrace.h> 781#include <asm/ptrace.h>
782 782
783asmlinkage long sys_ptrace(long request, long pid,
784 unsigned long addr, long data);
785asmlinkage long sys_iopl(unsigned int level, struct pt_regs *regs); 783asmlinkage long sys_iopl(unsigned int level, struct pt_regs *regs);
786asmlinkage long sys_ioperm(unsigned long from, unsigned long num, int turn_on); 784asmlinkage long sys_ioperm(unsigned long from, unsigned long num, int turn_on);
787struct sigaction; 785struct sigaction;
diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h
index a6f03e473737..c7007b1db91d 100644
--- a/include/linux/syscalls.h
+++ b/include/linux/syscalls.h
@@ -491,6 +491,7 @@ asmlinkage long sys_nfsservctl(int cmd,
491asmlinkage long sys_syslog(int type, char __user *buf, int len); 491asmlinkage long sys_syslog(int type, char __user *buf, int len);
492asmlinkage long sys_uselib(const char __user *library); 492asmlinkage long sys_uselib(const char __user *library);
493asmlinkage long sys_ni_syscall(void); 493asmlinkage long sys_ni_syscall(void);
494asmlinkage long sys_ptrace(long request, long pid, long addr, long data);
494 495
495asmlinkage long sys_add_key(const char __user *_type, 496asmlinkage long sys_add_key(const char __user *_type,
496 const char __user *_description, 497 const char __user *_description,