Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 26 Apr 2021 19:03:52 GMT
From:      John Baldwin <jhb@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: 483bcffad704 - stable/13 - cxgbei: Set vnet around tcp_drop() in do_rx_iscsi_ddp().
Message-ID:  <202104261903.13QJ3qAW080064@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/13 has been updated by jhb:

URL: https://cgit.FreeBSD.org/src/commit/?id=483bcffad7042fdd2c5e4edbb5e1498a5de94cce

commit 483bcffad7042fdd2c5e4edbb5e1498a5de94cce
Author:     John Baldwin <jhb@FreeBSD.org>
AuthorDate: 2021-03-22 16:58:28 +0000
Commit:     John Baldwin <jhb@FreeBSD.org>
CommitDate: 2021-04-26 19:01:40 +0000

    cxgbei: Set vnet around tcp_drop() in do_rx_iscsi_ddp().
    
    Sponsored by:   Chelsio Communications
    
    (cherry picked from commit 52c11c3f744c8a68fb71a1343e8ffb4a9f70072a)
---
 sys/dev/cxgbe/cxgbei/cxgbei.c | 2 ++
 1 file changed, 2 insertions(+)

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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202104261903.13QJ3qAW080064>