diff options
author | glebius <glebius@FreeBSD.org> | 2005-02-16 16:00:35 +0000 |
---|---|---|
committer | glebius <glebius@FreeBSD.org> | 2005-02-16 16:00:35 +0000 |
commit | 471fd11ce3f4096d37c15a3fb298633dd6c22a66 (patch) | |
tree | 917e96cf3aabb325819053ccb5be505a3661c530 | |
parent | ae4586a78eda715abcce1a3d4b50d3bec55ff5db (diff) | |
download | FreeBSD-src-471fd11ce3f4096d37c15a3fb298633dd6c22a66.zip FreeBSD-src-471fd11ce3f4096d37c15a3fb298633dd6c22a66.tar.gz |
Remove a recursion protection, which we inherited from splnet() netgraph times.
Now several threads may write data to ng_ksocket. Locking of socket is done in
sosend().
Reviewed by: archie, julian, rwatson
MFC after: 2 weeks
-rw-r--r-- | sys/netgraph/ng_ksocket.c | 9 |
1 files changed, 0 insertions, 9 deletions
diff --git a/sys/netgraph/ng_ksocket.c b/sys/netgraph/ng_ksocket.c index 161b485..d311beb 100644 --- a/sys/netgraph/ng_ksocket.c +++ b/sys/netgraph/ng_ksocket.c @@ -96,7 +96,6 @@ typedef struct ng_ksocket_private *priv_p; #define KSF_EOFSEEN 0x00000004 /* Have sent 0-length EOF mbuf */ #define KSF_CLONED 0x00000008 /* Cloned from an accepting socket */ #define KSF_EMBRYONIC 0x00000010 /* Cloned node with no hooks yet */ -#define KSF_SENDING 0x00000020 /* Sending on socket */ /* Netgraph node methods */ static ng_constructor_t ng_ksocket_constructor; @@ -898,12 +897,6 @@ ng_ksocket_rcvdata(hook_p hook, item_p item) struct mbuf *m; struct sa_tag *stag; - /* Avoid reentrantly sending on the socket */ - if ((priv->flags & KSF_SENDING) != 0) { - NG_FREE_ITEM(item); - return (EDEADLK); - } - /* Extract data */ NGI_GET_M(item, m); NG_FREE_ITEM(item); @@ -919,9 +912,7 @@ ng_ksocket_rcvdata(hook_p hook, item_p item) sa = &stag->sa; /* Send packet */ - priv->flags |= KSF_SENDING; error = (*so->so_proto->pr_usrreqs->pru_sosend)(so, sa, 0, m, 0, 0, td); - priv->flags &= ~KSF_SENDING; return (error); } |