freebsd-src/sys/ddb
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
..
db_access.c
db_access.h
db_break.c ddb: clean up empty lines in .c and .h files 2020-09-01 22:14:30 +00:00
db_break.h
db_capture.c Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (17 of many) 2020-02-26 14:26:36 +00:00
db_command.c Use atomic loads/stores when updating td->td_state 2021-02-18 14:02:48 +00:00
db_command.h
db_examine.c
db_expr.c kernel: provide panicky version of __unreachable 2020-05-13 18:07:37 +00:00
db_input.c
db_lex.c
db_lex.h
db_main.c [PowerPC] More relocation fixes 2020-06-21 03:39:26 +00:00
db_output.c ddb: clean up empty lines in .c and .h files 2020-09-01 22:14:30 +00:00
db_output.h
db_print.c ddb: add ability to print user registers 2021-01-08 14:53:06 -04:00
db_ps.c Use atomic loads/stores when updating td->td_state 2021-02-18 14:02:48 +00:00
db_run.c
db_script.c Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (17 of many) 2020-02-26 14:26:36 +00:00
db_sym.c db_search_symbol: prevent pollution from bogus symbols 2020-10-26 16:42:53 +00:00
db_sym.h
db_textdump.c Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (17 of many) 2020-02-26 14:26:36 +00:00
db_thread.c Use kdb_thr_from_pid() in db_lookup_thread(). 2020-12-31 16:01:27 -08:00
db_variables.c
db_variables.h
db_watch.c ddb: clean up empty lines in .c and .h files 2020-09-01 22:14:30 +00:00
db_watch.h
db_write_cmd.c ddb: clean up empty lines in .c and .h files 2020-09-01 22:14:30 +00:00
ddb.h [PowerPC] More relocation fixes 2020-06-21 03:39:26 +00:00