freebsd-dev/sys/dev/cxgbe/crypto
Navdeep Parhar a727d9531a cxgbe(4): Fix bad races between sysctl and driver detach.
The default sysctl context setup by newbus for a device is eventually
freed by device_sysctl_fini, which runs after the device driver's detach
routine.  sysctl nodes associated with this context must not use any
resources (like driver locks, hardware access, counters, etc.) that are
released by driver detach.

There are a lot of sysctl nodes like this in cxgbe(4) and the fix is to
hang them off a context that is explicitly freed by the driver before it
releases any resource that might be used by a sysctl.

This fixes panics when running "sysctl dev.t6nex dev.cc" in a tight loop
and loading/unloading the driver in parallel.

Reported by:	Suhas Lokesha
MFC after:	1 week
Sponsored by:	Chelsio Communications
2022-01-14 16:44:57 -08:00
..
t4_crypto.c cxgbe(4): Fix bad races between sysctl and driver detach. 2022-01-14 16:44:57 -08:00
t4_crypto.h cxgbe: De-duplicate some of the code for managing TLS key contexts. 2021-06-15 17:45:32 -07:00
t4_kern_tls.c cxgbe: fix LINT-NOIP builds 2021-09-24 14:21:18 +02:00
t4_keyctx.c crypto: Constify all transform descriptors 2021-07-26 16:41:05 -04:00