Fix panics with misconfigured routing:
- Backout previous revision, the check is useless. - Turn node to queue mode, since it is edge node. Reported by: sem
This commit is contained in:
parent
dac263a70e
commit
bc90ff47ff
@ -596,6 +596,14 @@ ng_ksocket_newhook(node_p node, hook_p hook, const char *name0)
|
|||||||
|
|
||||||
/* OK */
|
/* OK */
|
||||||
priv->hook = hook;
|
priv->hook = hook;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* In case of misconfigured routing a packet may reenter
|
||||||
|
* ksocket node recursively. Decouple stack to avoid possible
|
||||||
|
* panics about sleeping with locks held.
|
||||||
|
*/
|
||||||
|
NG_HOOK_FORCE_QUEUE(hook);
|
||||||
|
|
||||||
return(0);
|
return(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -897,12 +905,6 @@ ng_ksocket_rcvdata(hook_p hook, item_p item)
|
|||||||
struct mbuf *m;
|
struct mbuf *m;
|
||||||
struct sa_tag *stag;
|
struct sa_tag *stag;
|
||||||
|
|
||||||
/* Avoid reentrantly sending on the socket */
|
|
||||||
if (SOCKBUF_OWNED(&so->so_snd)) {
|
|
||||||
NG_FREE_ITEM(item);
|
|
||||||
return (EDEADLK);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Extract data */
|
/* Extract data */
|
||||||
NGI_GET_M(item, m);
|
NGI_GET_M(item, m);
|
||||||
NG_FREE_ITEM(item);
|
NG_FREE_ITEM(item);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user