freebsd-nq/sys/gdb
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
..
gdb_cons.c gdb(4): Root a sysctl tree at 'debug.gdb.' 2019-09-08 22:52:47 +00:00
gdb_int.h gdb(4): Implement support for NoAckMode 2019-10-17 22:37:25 +00:00
gdb_main.c Use atomic loads/stores when updating td->td_state 2021-02-18 14:02:48 +00:00
gdb_packet.c gdb(4): Implement support for NoAckMode 2019-10-17 22:37:25 +00:00
gdb.h gdb(4): Implement support for NoAckMode 2019-10-17 22:37:25 +00:00
netgdb.c Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (17 of many) 2020-02-26 14:26:36 +00:00
netgdb.h Implement NetGDB(4) 2019-10-17 21:33:01 +00:00