[CVE-2009-0029] System call wrappers part 07
[linux-2.6-block.git] / net / socket.c
index 2c730fc718ab4f28f2135893ccd9683def86be78..cc9b666e58f6ae6c12cc947f05d9ac5af0f6a6f9 100644 (file)
@@ -1313,13 +1313,7 @@ asmlinkage long sys_socketpair(int family, int type, int protocol,
                goto out_fd1;
        }
 
-       err = audit_fd_pair(fd1, fd2);
-       if (err < 0) {
-               fput(newfile1);
-               fput(newfile2);
-               goto out_fd;
-       }
-
+       audit_fd_pair(fd1, fd2);
        fd_install(fd1, newfile1);
        fd_install(fd2, newfile2);
        /* fd1 and fd2 may be already another descriptors.
@@ -1349,7 +1343,6 @@ out_fd2:
 out_fd1:
        put_filp(newfile2);
        sock_release(sock2);
-out_fd:
        put_unused_fd(fd1);
        put_unused_fd(fd2);
        goto out;
@@ -1796,7 +1789,7 @@ out_put:
  *     Shutdown a socket.
  */
 
-asmlinkage long sys_shutdown(int fd, int how)
+SYSCALL_DEFINE2(shutdown, int, fd, int, how)
 {
        int err, fput_needed;
        struct socket *sock;
@@ -2065,9 +2058,7 @@ asmlinkage long sys_socketcall(int call, unsigned long __user *args)
        if (copy_from_user(a, args, nargs[call]))
                return -EFAULT;
 
-       err = audit_socketcall(nargs[call] / sizeof(unsigned long), a);
-       if (err)
-               return err;
+       audit_socketcall(nargs[call] / sizeof(unsigned long), a);
 
        a0 = a[0];
        a1 = a[1];