Date: Tue, 14 Sep 2021 20:46:43 GMT From: John Baldwin <jhb@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: 9affbb0f5271 - main - cxgbe tom: Enter network epoch in t4_aiotx_task(). Message-ID: <202109142046.18EKkhh4043923@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=9affbb0f5271b199de8a2203fd7d8b1fbedca2af commit 9affbb0f5271b199de8a2203fd7d8b1fbedca2af Author: John Baldwin <jhb@FreeBSD.org> AuthorDate: 2021-09-14 20:46:15 +0000 Commit: John Baldwin <jhb@FreeBSD.org> CommitDate: 2021-09-14 20:46:15 +0000 cxgbe tom: Enter network epoch in t4_aiotx_task(). While here, don't restore the old vnet until after sorele(). Sponsored by: Chelsio Communications --- sys/dev/cxgbe/tom/t4_cpl_io.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sys/dev/cxgbe/tom/t4_cpl_io.c b/sys/dev/cxgbe/tom/t4_cpl_io.c index 4c558df3f258..686819065863 100644 --- a/sys/dev/cxgbe/tom/t4_cpl_io.c +++ b/sys/dev/cxgbe/tom/t4_cpl_io.c @@ -2353,9 +2353,11 @@ t4_aiotx_task(void *context, int pending) struct toepcb *toep = context; struct socket *so; struct kaiocb *job; + struct epoch_tracker et; so = toep->aiotx_so; CURVNET_SET(toep->vnet); + NET_EPOCH_ENTER(et); SOCKBUF_LOCK(&so->so_snd); while (!TAILQ_EMPTY(&toep->aiotx_jobq) && sowriteable(so)) { job = TAILQ_FIRST(&toep->aiotx_jobq); @@ -2367,11 +2369,12 @@ t4_aiotx_task(void *context, int pending) } toep->aiotx_so = NULL; SOCKBUF_UNLOCK(&so->so_snd); - CURVNET_RESTORE(); + NET_EPOCH_EXIT(et); free_toepcb(toep); SOCK_LOCK(so); sorele(so); + CURVNET_RESTORE(); } static void
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202109142046.18EKkhh4043923>