When returning early from audit_arg_file() due to so->so_pcb being NULL
(due to an early reset or the like), remember to unlock the socket lock. This will not occur in 7-CURRENT, but could in theory occur in 6-STABLE. MFC after: 1 week
This commit is contained in:
parent
e8188b5da1
commit
6ac99f7113
@ -619,8 +619,10 @@ audit_arg_file(struct proc *p, struct file *fp)
|
||||
so = (struct socket *)fp->f_data;
|
||||
SOCK_LOCK(so);
|
||||
if (INP_CHECK_SOCKAF(so, PF_INET)) {
|
||||
if (so->so_pcb == NULL)
|
||||
if (so->so_pcb == NULL) {
|
||||
SOCK_UNLOCK(so);
|
||||
return;
|
||||
}
|
||||
ar->k_ar.ar_arg_sockinfo.so_type =
|
||||
so->so_type;
|
||||
ar->k_ar.ar_arg_sockinfo.so_domain =
|
||||
@ -645,7 +647,6 @@ audit_arg_file(struct proc *p, struct file *fp)
|
||||
/* XXXAUDIT: else? */
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
|
Loading…
x
Reference in New Issue
Block a user