Revert one half of previous change r357558. Don't enter the epoch on

sends to control socket.  Control socket messages can run constructors
of nodes and other stuff that is allowed to M_WAITOK.

PR:		244241
This commit is contained in:
Gleb Smirnoff 2020-02-21 04:10:41 +00:00
parent 721a81c369
commit be3d57e69b
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=358193

View File

@ -219,7 +219,6 @@ static int
ngc_send(struct socket *so, int flags, struct mbuf *m, struct sockaddr *addr,
struct mbuf *control, struct thread *td)
{
struct epoch_tracker et;
struct ngpcb *const pcbp = sotongpcb(so);
struct ngsock *const priv = NG_NODE_PRIVATE(pcbp->sockdata->node);
struct sockaddr_ng *const sap = (struct sockaddr_ng *) addr;
@ -338,9 +337,7 @@ ngc_send(struct socket *so, int flags, struct mbuf *m, struct sockaddr *addr,
item->apply = &apply;
priv->error = -1;
NET_EPOCH_ENTER(et);
error = ng_snd_item(item, 0);
NET_EPOCH_EXIT(et);
mtx_lock(&priv->mtx);
if (priv->error == -1)