freebsd-skq/sys/compat
Hans Petter Selasky b764a42653 There is a window where threads are removed from the process list and where
the thread destructor is invoked. Catch that window by waiting for all
task_struct allocations to be returned before freeing the UMA zone in the
LinuxKPI. Else UMA may fail to release the zone due to concurrent access
and panic:

panic() - Bad link element prev->next != elm
zone_release()
bucket_drain()
bucket_free()
zone_dtor()
zone_free_item()
uma_zdestroy()
linux_current_uninit()

This failure can be triggered by loading and unloading the LinuxKPI module
in a loop:

while true
do
kldload linuxkpi
kldunload linuxkpi
done

Discussed with:	kib@
MFC after:	1 week
Sponsored by:	Mellanox Technologies // NVIDIA Networking
2021-05-21 13:18:41 +02:00
..
cloudabi kern_linkat: modify to accept AT_ flags instead of FOLLOW/NOFOLLOW 2021-04-25 14:13:12 +01:00
cloudabi32 regen syscall files after d51198d63b63 2021-05-13 14:09:58 -04:00
cloudabi64 regen syscall files after d51198d63b63 2021-05-13 14:09:58 -04:00
freebsd32 regen syscall files after d51198d63b63 2021-05-13 14:09:58 -04:00
ia32 random(4) FenestrasX: Push root seed version to arc4random(3) 2020-10-10 21:52:00 +00:00
lindebugfs Add emulation support for the Linux kcov(4) ioctl API. 2020-09-04 00:12:28 +00:00
linprocfs Use atomic loads/stores when updating td->td_state 2021-02-18 14:02:48 +00:00
linsysfs linsysfs: create /sys/bus/ and /sys/subsystem/ 2021-03-11 15:50:51 +00:00
linux linux: remove redundant SDT tracepoints 2021-05-05 13:59:00 +01:00
linuxkpi/common There is a window where threads are removed from the process list and where 2021-05-21 13:18:41 +02:00
x86bios Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (17 of many) 2020-02-26 14:26:36 +00:00