提交 853b3da1 编写于 作者: A Al Viro

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: NAl Viro <viro@zeniv.linux.org.uk>
上级 8bea8672
...@@ -445,12 +445,7 @@ int hpux_getdomainname(char __user *name, int len) ...@@ -445,12 +445,7 @@ int hpux_getdomainname(char __user *name, int len)
int hpux_pipe(int *kstack_fildes) int hpux_pipe(int *kstack_fildes)
{ {
int error; return do_pipe_flags(kstack_fildes, 0);
lock_kernel();
error = do_pipe_flags(kstack_fildes, 0);
unlock_kernel();
return error;
} }
/* lies - says it works, but it really didn't lock anything */ /* lies - says it works, but it really didn't lock anything */
......
...@@ -30,7 +30,6 @@ struct mmap_arg_struct; ...@@ -30,7 +30,6 @@ struct mmap_arg_struct;
asmlinkage long sys32_mmap(struct mmap_arg_struct __user *); asmlinkage long sys32_mmap(struct mmap_arg_struct __user *);
asmlinkage long sys32_mprotect(unsigned long, size_t, unsigned long); asmlinkage long sys32_mprotect(unsigned long, size_t, unsigned long);
asmlinkage long sys32_pipe(int __user *);
struct sigaction32; struct sigaction32;
struct old_sigaction32; struct old_sigaction32;
asmlinkage long sys32_rt_sigaction(int, struct sigaction32 __user *, asmlinkage long sys32_rt_sigaction(int, struct sigaction32 __user *,
......
...@@ -12,7 +12,6 @@ struct pt_regs; ...@@ -12,7 +12,6 @@ struct pt_regs;
struct sigaction; struct sigaction;
asmlinkage long xtensa_execve(char*, char**, char**, struct pt_regs*); asmlinkage long xtensa_execve(char*, char**, char**, struct pt_regs*);
asmlinkage long xtensa_clone(unsigned long, unsigned long, struct pt_regs*); asmlinkage long xtensa_clone(unsigned long, unsigned long, struct pt_regs*);
asmlinkage long xtensa_pipe(int __user *);
asmlinkage long xtensa_ptrace(long, long, long, long); asmlinkage long xtensa_ptrace(long, long, long, long);
asmlinkage long xtensa_sigreturn(struct pt_regs*); asmlinkage long xtensa_sigreturn(struct pt_regs*);
asmlinkage long xtensa_rt_sigreturn(struct pt_regs*); asmlinkage long xtensa_rt_sigreturn(struct pt_regs*);
......
...@@ -94,7 +94,7 @@ __SYSCALL( 35, sys_readlink, 3) ...@@ -94,7 +94,7 @@ __SYSCALL( 35, sys_readlink, 3)
#define __NR_mknod 36 #define __NR_mknod 36
__SYSCALL( 36, sys_mknod, 3) __SYSCALL( 36, sys_mknod, 3)
#define __NR_pipe 37 #define __NR_pipe 37
__SYSCALL( 37, xtensa_pipe, 1) __SYSCALL( 37, sys_pipe, 1)
#define __NR_unlink 38 #define __NR_unlink 38
__SYSCALL( 38, sys_unlink, 1) __SYSCALL( 38, sys_unlink, 1)
#define __NR_rmdir 39 #define __NR_rmdir 39
......
...@@ -39,24 +39,6 @@ syscall_t sys_call_table[__NR_syscall_count] /* FIXME __cacheline_aligned */= { ...@@ -39,24 +39,6 @@ syscall_t sys_call_table[__NR_syscall_count] /* FIXME __cacheline_aligned */= {
#include <asm/unistd.h> #include <asm/unistd.h>
}; };
/*
* xtensa_pipe() is the normal C calling standard for creating a pipe. It's not
* the way unix traditional does this, though.
*/
asmlinkage long xtensa_pipe(int __user *userfds)
{
int fd[2];
int error;
error = do_pipe_flags(fd, 0);
if (!error) {
if (copy_to_user(userfds, fd, 2 * sizeof(int)))
error = -EFAULT;
}
return error;
}
asmlinkage long xtensa_shmat(int shmid, char __user *shmaddr, int shmflg) asmlinkage long xtensa_shmat(int shmid, char __user *shmaddr, int shmflg)
{ {
unsigned long ret; unsigned long ret;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册