The branch main has been updated by erj: URL: https://cgit.FreeBSD.org/src/commit/?id=04d4e34538cf8f8ac99b5aa1c6c50b626d976dfd
commit 04d4e34538cf8f8ac99b5aa1c6c50b626d976dfd Author: Przemyslaw Lewandowski <[email protected]> AuthorDate: 2023-07-27 22:47:12 +0000 Commit: Eric Joyner <[email protected]> CommitDate: 2023-07-27 22:47:12 +0000 iflib: Fix panic during driver reload stress test During a driver reload stress test, after 50-300 reloads a panic occurs. After adding sleeps in between loading and unloading the driver, the issue does not occur. It's possible that loading/unloading too fast may cause the gt_taskqueue pointer to be freed earlier than expected; checking for a null pointer first fixes it. Signed-off-by: Eric Joyner <[email protected]> Reviewed by: erj@ Tested by: [email protected] MFC after: 3 days Sponsored by: Intel Corporation Differential Revision: https://reviews.freebsd.org/D39457 --- sys/net/iflib.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/net/iflib.c b/sys/net/iflib.c index 9f433481afda..4dd6349f6be1 100644 --- a/sys/net/iflib.c +++ b/sys/net/iflib.c @@ -1650,7 +1650,8 @@ iflib_fast_intr_ctx(void *arg) return (result); } - GROUPTASK_ENQUEUE(gtask); + if (gtask->gt_taskqueue != NULL) + GROUPTASK_ENQUEUE(gtask); return (FILTER_HANDLED); }
