aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Baldwin <jhb@FreeBSD.org>2021-03-22 16:58:28 +0000
committerJohn Baldwin <jhb@FreeBSD.org>2021-03-22 17:05:02 +0000
commit52c11c3f744c8a68fb71a1343e8ffb4a9f70072a (patch)
treea44715e71cebc5eb368d06ac2122c705b40529de
parentf33b4fa2f0d4acf3978c7490b25c999b319c543b (diff)
downloadsrc-52c11c3f744c8a68fb71a1343e8ffb4a9f70072a.tar.gz
src-52c11c3f744c8a68fb71a1343e8ffb4a9f70072a.zip
cxgbei: Set vnet around tcp_drop() in do_rx_iscsi_ddp().
Reviewed by: np MFC after: 2 weeks Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D29298
-rw-r--r--sys/dev/cxgbe/cxgbei/cxgbei.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/dev/cxgbe/cxgbei/cxgbei.c b/sys/dev/cxgbe/cxgbei/cxgbei.c
index bf5bb7b9ad62..fb5843b0b51a 100644
--- a/sys/dev/cxgbe/cxgbei/cxgbei.c
+++ b/sys/dev/cxgbe/cxgbei/cxgbei.c
@@ -412,12 +412,14 @@ do_rx_iscsi_ddp(struct sge_iq *iq, const struct rss_header *rss, struct mbuf *m)
SOCKBUF_UNLOCK(sb);
INP_WUNLOCK(inp);
+ CURVNET_SET(so->so_vnet);
NET_EPOCH_ENTER(et);
INP_WLOCK(inp);
tp = tcp_drop(tp, ECONNRESET);
if (tp)
INP_WUNLOCK(inp);
NET_EPOCH_EXIT(et);
+ CURVNET_RESTORE();
icl_cxgbei_conn_pdu_free(NULL, ip);
#ifdef INVARIANTS