]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
iflib: Fix panic during driver reload stress test
authorPrzemyslaw Lewandowski <przemyslawx.lewandowski@intel.com>
Thu, 27 Jul 2023 22:47:12 +0000 (15:47 -0700)
committerEric Joyner <erj@FreeBSD.org>
Thu, 24 Aug 2023 21:04:16 +0000 (14:04 -0700)
commitcb5152f961bbb89b186ee76aaa8eb631f21cf6c4
tree7e728d040ab7a7a8b9298c307a6bbbf4c4493660
parent7756dcc46f3b1059e68fdd0099ca26618d5d8d62
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 <erj@FreeBSD.org>
Reviewed by: erj@
Tested by: jeffrey.e.pieper@intel.com
Sponsored by: Intel Corporation
Differential Revision: https://reviews.freebsd.org/D39457

(cherry picked from commit 04d4e34538cf8f8ac99b5aa1c6c50b626d976dfd)
sys/net/iflib.c