Commit 853b3da10d617f08340e5fe569c99e7b54f2a568

Authored by Al Viro
1 parent 8bea8672ed

sanitize do_pipe_flags() callers in arch

* hpux_pipe() - no need to take BKL
* sys32_pipe() in arch/x86/ia32 and xtensa_pipe() in arch/xtensa -
	no need at all, since both functions are open-coded sys_pipe()

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>

Showing 5 changed files with 2 additions and 27 deletions Side-by-side Diff

arch/parisc/hpux/sys_hpux.c
... ... @@ -445,12 +445,7 @@
445 445  
446 446 int hpux_pipe(int *kstack_fildes)
447 447 {
448   - int error;
449   -
450   - lock_kernel();
451   - error = do_pipe_flags(kstack_fildes, 0);
452   - unlock_kernel();
453   - return error;
  448 + return do_pipe_flags(kstack_fildes, 0);
454 449 }
455 450  
456 451 /* lies - says it works, but it really didn't lock anything */
arch/x86/include/asm/sys_ia32.h
... ... @@ -30,7 +30,6 @@
30 30 asmlinkage long sys32_mmap(struct mmap_arg_struct __user *);
31 31 asmlinkage long sys32_mprotect(unsigned long, size_t, unsigned long);
32 32  
33   -asmlinkage long sys32_pipe(int __user *);
34 33 struct sigaction32;
35 34 struct old_sigaction32;
36 35 asmlinkage long sys32_rt_sigaction(int, struct sigaction32 __user *,
arch/xtensa/include/asm/syscall.h
... ... @@ -12,7 +12,6 @@
12 12 struct sigaction;
13 13 asmlinkage long xtensa_execve(char*, char**, char**, struct pt_regs*);
14 14 asmlinkage long xtensa_clone(unsigned long, unsigned long, struct pt_regs*);
15   -asmlinkage long xtensa_pipe(int __user *);
16 15 asmlinkage long xtensa_ptrace(long, long, long, long);
17 16 asmlinkage long xtensa_sigreturn(struct pt_regs*);
18 17 asmlinkage long xtensa_rt_sigreturn(struct pt_regs*);
arch/xtensa/include/asm/unistd.h
... ... @@ -94,7 +94,7 @@
94 94 #define __NR_mknod 36
95 95 __SYSCALL( 36, sys_mknod, 3)
96 96 #define __NR_pipe 37
97   -__SYSCALL( 37, xtensa_pipe, 1)
  97 +__SYSCALL( 37, sys_pipe, 1)
98 98 #define __NR_unlink 38
99 99 __SYSCALL( 38, sys_unlink, 1)
100 100 #define __NR_rmdir 39
arch/xtensa/kernel/syscall.c
... ... @@ -39,24 +39,6 @@
39 39 #include <asm/unistd.h>
40 40 };
41 41  
42   -/*
43   - * xtensa_pipe() is the normal C calling standard for creating a pipe. It's not
44   - * the way unix traditional does this, though.
45   - */
46   -
47   -asmlinkage long xtensa_pipe(int __user *userfds)
48   -{
49   - int fd[2];
50   - int error;
51   -
52   - error = do_pipe_flags(fd, 0);
53   - if (!error) {
54   - if (copy_to_user(userfds, fd, 2 * sizeof(int)))
55   - error = -EFAULT;
56   - }
57   - return error;
58   -}
59   -
60 42 asmlinkage long xtensa_shmat(int shmid, char __user *shmaddr, int shmflg)
61 43 {
62 44 unsigned long ret;