X-Git-Url: http://plrg.eecs.uci.edu/git/?a=blobdiff_plain;f=net%2Fsocket.c;h=6b94633ca61d67e29faa58a7d42410e1ef678193;hb=c4cc75c3321cad6f20d1e5325293890255c8a663;hp=280283f03cccee4c23055103a5586bb94a49809b;hpb=bc7562355fda8075793bf66094cda573206ec693;p=firefly-linux-kernel-4.4.55.git diff --git a/net/socket.c b/net/socket.c index 280283f03ccc..6b94633ca61d 100644 --- a/net/socket.c +++ b/net/socket.c @@ -1160,15 +1160,6 @@ static int sock_mmap(struct file *file, struct vm_area_struct *vma) static int sock_close(struct inode *inode, struct file *filp) { - /* - * It was possible the inode is NULL we were - * closing an unfinished socket. - */ - - if (!inode) { - printk(KERN_DEBUG "sock_close: NULL inode\n"); - return 0; - } sock_release(SOCKET_I(inode)); return 0; } @@ -2421,7 +2412,7 @@ static const unsigned char nargs[21] = { SYSCALL_DEFINE2(socketcall, int, call, unsigned long __user *, args) { - unsigned long a[6]; + unsigned long a[AUDITSC_ARGS]; unsigned long a0, a1; int err; unsigned int len; @@ -2437,7 +2428,9 @@ SYSCALL_DEFINE2(socketcall, int, call, unsigned long __user *, args) if (copy_from_user(a, args, len)) return -EFAULT; - audit_socketcall(nargs[call] / sizeof(unsigned long), a); + err = audit_socketcall(nargs[call] / sizeof(unsigned long), a); + if (err) + return err; a0 = a[0]; a1 = a[1];