projects
/
firefly-linux-kernel-4.4.55.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge git://git.infradead.org/users/eparis/audit
[firefly-linux-kernel-4.4.55.git]
/
net
/
socket.c
diff --git
a/net/socket.c
b/net/socket.c
index 280283f03cccee4c23055103a5586bb94a49809b..6b94633ca61d67e29faa58a7d42410e1ef678193 100644
(file)
--- 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)
{
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;
}
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)
{
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;
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;
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];
a0 = a[0];
a1 = a[1];