Reimplement recursion protection, checking whether current thread holds
sockbuf mutex. Reviewed by: rwatson
This commit is contained in:
parent
949d92c657
commit
f1c6a420b1
@ -897,6 +897,12 @@ ng_ksocket_rcvdata(hook_p hook, item_p item)
|
||||
struct mbuf *m;
|
||||
struct sa_tag *stag;
|
||||
|
||||
/* Avoid reentrantly sending on the socket */
|
||||
if (SOCKBUF_OWNED(&so->so_snd)) {
|
||||
NG_FREE_ITEM(item);
|
||||
return (EDEADLK);
|
||||
}
|
||||
|
||||
/* Extract data */
|
||||
NGI_GET_M(item, m);
|
||||
NG_FREE_ITEM(item);
|
||||
|
Loading…
Reference in New Issue
Block a user