opnsense-src/sys/dev/cxgbe
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
..
common cxgbe(4): Fix regression in previous attempt to fix FEC selection. 2022-01-10 14:04:56 -08:00
crypto cxgbe(4): Fix bad races between sysctl and driver detach. 2022-01-14 16:44:57 -08:00
cudbg cxgbe(4): Fix "set but not used [-Wunused-but-set-variable]" warnings. 2022-01-10 12:15:12 -08:00
cxgbei cxgbe(4): Fix "set but not used [-Wunused-but-set-variable]" warnings. 2022-01-10 12:15:12 -08:00
firmware cxgbe(4): Update firmwares to 1.26.6.0. 2022-01-03 15:24:42 -08:00
iw_cxgbe cxgbe(4): Fix "set but not used [-Wunused-but-set-variable]" warnings. 2022-01-10 12:15:12 -08:00
tom cxgbe(4): Fix "set but not used [-Wunused-but-set-variable]" warnings. 2022-01-10 12:15:12 -08:00
adapter.h cxgbe(4): Fix bad races between sysctl and driver detach. 2022-01-14 16:44:57 -08:00
if_cc.c
if_ccv.c
if_cxl.c
if_cxlv.c
offload.h cxgbei: Support for ISO (iSCSI segmentation offload). 2021-08-06 14:21:37 -07:00
osdep.h cxgbe(4): make the logging helpers a little more robust. 2021-04-22 15:28:43 -07:00
t4_clip.c cxgbe(4): Empty the clib_db before trying to destroy it. 2021-06-04 12:01:14 -07:00
t4_clip.h cxgbe(4): Overhaul CLIP (Compressed Local IPv6) table management. 2021-05-23 16:07:29 -07:00
t4_filter.c cxgbe(4): Add support for NIC suspend/resume and live reset. 2021-04-27 22:48:51 -07:00
t4_if.m
t4_ioctl.h cxgbe(4): Overhaul CLIP (Compressed Local IPv6) table management. 2021-05-23 16:07:29 -07:00
t4_iov.c cxgbe(4): Allow the PF driver to set a VF's MAC address. 2020-11-09 00:08:35 +00:00
t4_l2t.c NIC KTLS for Chelsio T6 adapters. 2019-11-21 19:30:31 +00:00
t4_l2t.h NIC KTLS for Chelsio T6 adapters. 2019-11-21 19:30:31 +00:00
t4_main.c cxgbe(4): Fix bad races between sysctl and driver detach. 2022-01-14 16:44:57 -08:00
t4_mp_ring.c cxgbe(4): changes in the Tx path to help increase tx coalescing. 2020-07-03 04:44:23 +00:00
t4_mp_ring.h cxgbe(4): changes in the Tx path to help increase tx coalescing. 2020-07-03 04:44:23 +00:00
t4_netmap.c cxgbe(4): Separate the sw- and hw-specific parts of resource allocations 2021-04-26 14:09:59 -07:00
t4_sched.c Add a switch structure for send tags. 2021-09-14 11:43:41 -07:00
t4_sge.c cxgbe(4): Fix build warning for LINT-NOIP. 2022-01-10 12:35:43 -08:00
t4_smt.c
t4_smt.h
t4_tracer.c cxgbe(4): Add support for NIC suspend/resume and live reset. 2021-04-27 22:48:51 -07:00
t4_vf.c cxgbe(4): Fix bad races between sysctl and driver detach. 2022-01-14 16:44:57 -08:00