freebsd-dev/sys/compat
Alex Richardson fa2528ac64 Use atomic loads/stores when updating td->td_state
KCSAN complains about racy accesses in the locking code. Those races are
fine since they are inside a TD_SET_RUNNING() loop that expects the value
to be changed by another CPU.

Use relaxed atomic stores/loads to indicate that this variable can be
written/read by multiple CPUs at the same time. This will also prevent
the compiler from doing unexpected re-ordering.

Reported by:	GENERIC-KCSAN
Test Plan:	KCSAN no longer complains, kernel still runs fine.
Reviewed By:	markj, mjg (earlier version)
Differential Revision: https://reviews.freebsd.org/D28569
2021-02-18 14:02:48 +00:00
..
cloudabi Rename kern_mmap_req to kern_mmap 2021-01-25 21:50:37 +00:00
cloudabi32 Regen after r366145. 2020-09-25 10:05:38 +00:00
cloudabi64 Regen after r366145. 2020-09-25 10:05:38 +00:00
freebsd32 Rename kern_mmap_req to kern_mmap 2021-01-25 21:50:37 +00: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 Add emulation support for the Linux kcov(4) ioctl API. 2020-09-04 00:12:28 +00:00
linux linux: Unmap the VDSO page when unloading 2021-02-16 09:40:02 -05:00
linuxkpi/common Fix race condition in linuxkpi workqueue 2021-02-04 13:54:53 -05:00
x86bios Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (17 of many) 2020-02-26 14:26:36 +00:00