Date: Wed, 10 Sep 2025 16:00:53 GMT From: Mark Johnston <markj@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: b653a281f5a9 - main - re: Make sure re_rxeof() is called in net epoch context Message-ID: <202509101600.58AG0rBM058479@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=b653a281f5a977ba73b3d405874f8af8e8b6b50d commit b653a281f5a977ba73b3d405874f8af8e8b6b50d Author: Mark Johnston <markj@FreeBSD.org> AuthorDate: 2025-09-10 14:35:24 +0000 Commit: Mark Johnston <markj@FreeBSD.org> CommitDate: 2025-09-10 16:00:13 +0000 re: Make sure re_rxeof() is called in net epoch context It may pass packets up the stack and so needs to be called in a network epoch. When a watchdog timeout happens, we need to enter a section explicitly. Reviewed by: zlei, glebius, adrian MFC after: 2 weeks Sponsored by: Innovate UK Differential Revision: https://reviews.freebsd.org/D51885 --- sys/dev/re/if_re.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sys/dev/re/if_re.c b/sys/dev/re/if_re.c index 091ab2db72ec..67864c2de388 100644 --- a/sys/dev/re/if_re.c +++ b/sys/dev/re/if_re.c @@ -3558,6 +3558,7 @@ re_ioctl(if_t ifp, u_long command, caddr_t data) static void re_watchdog(struct rl_softc *sc) { + struct epoch_tracker et; if_t ifp; RL_LOCK_ASSERT(sc); @@ -3578,7 +3579,9 @@ re_watchdog(struct rl_softc *sc) if_printf(ifp, "watchdog timeout\n"); if_inc_counter(ifp, IFCOUNTER_OERRORS, 1); + NET_EPOCH_ENTER(et); re_rxeof(sc, NULL); + NET_EPOCH_EXIT(et); if_setdrvflagbits(ifp, 0, IFF_DRV_RUNNING); re_init_locked(sc); if (!if_sendq_empty(ifp))
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202509101600.58AG0rBM058479>