Files
mirror_zfs/module/os/freebsd/spl
Kyle Evans bee314a798 module: freebsd: avoid a taking a destroyed lock in zfs_zevent bits
At shutdown time, we drain all of the zevents and set the
ZEVENT_SHUTDOWN flag.  On FreeBSD, we may end up calling
zfs_zevent_destroy() after the zevent_lock has been destroyed while
the sysevent thread is winding down; we observe ESHUTDOWN, then back
out.

Events have already been drained, so just inline the kmem_free call in
sysevent_worker() to avoid the race, and document the assumption that
zfs_zevent_destroy doesn't do anything else useful at that point.

This fixes a panic that can occur at module unload time.

Reviewed-by: Ryan Moeller <freqlabs@FreeBSD.org>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Kyle Evans <kevans@FreeBSD.org>
Closes #13220
2022-03-17 10:14:00 -07:00
..
2022-02-18 09:34:03 -08:00
2020-04-14 11:36:28 -07:00
2020-04-14 11:36:28 -07:00
2022-03-15 15:13:42 -07:00
2020-04-14 11:36:28 -07:00
2020-04-14 11:36:28 -07:00
2022-03-15 15:13:42 -07:00
2020-04-14 11:36:28 -07:00
2022-03-15 15:13:42 -07:00
2020-05-04 15:07:04 -07:00
2021-06-10 08:27:33 -07:00
2021-11-19 10:02:45 -07:00
2022-03-15 15:13:42 -07:00
2022-03-15 15:13:42 -07:00
2022-03-15 15:13:42 -07:00