summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGleb Smirnoff <glebius@FreeBSD.org>2005-04-18 11:32:17 +0000
committerGleb Smirnoff <glebius@FreeBSD.org>2005-04-18 11:32:17 +0000
commitbc90ff47ff94eba957fd39ff909c60acdcb811d3 (patch)
tree37f85362c17be1d43562f5b52fb8b6d2ac57e74e
parentdac263a70ebe27643488d38b5b932f9f3f51af34 (diff)
Notes
-rw-r--r--sys/netgraph/ng_ksocket.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/sys/netgraph/ng_ksocket.c b/sys/netgraph/ng_ksocket.c
index 3d2179821326..60b4c3ad6f05 100644
--- a/sys/netgraph/ng_ksocket.c
+++ b/sys/netgraph/ng_ksocket.c
@@ -596,6 +596,14 @@ ng_ksocket_newhook(node_p node, hook_p hook, const char *name0)
/* OK */
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);
}
@@ -897,12 +905,6 @@ 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);