[PATCH 0/3] lib/bug: concurrency fix, cleanups, and debugfs inspection

From: Josh Law

Date: Sun Mar 15 2026 - 15:50:03 EST


Small series for lib/bug.c:

- Fix a KCSAN data race on bug->flags by using READ_ONCE/WRITE_ONCE
and correcting the misleading comment about concurrency (patch 1).
- Clean up const-correctness and bare 'unsigned' types (patch 2).
- Add /sys/kernel/debug/bug_sites to inspect registered BUG/WARN
sites and their runtime state, complementing the existing
clear_warn_once interface (patch 3).

Build-tested with W=123.

Josh Law (3):
lib/bug: annotate concurrent access to bug->flags with
READ_ONCE/WRITE_ONCE
lib/bug: clean up types in bug reporting helpers
lib/bug: add debugfs interface to list all BUG/WARN sites

include/linux/bug.h | 6 +--
lib/bug.c | 96 +++++++++++++++++++++++++++++++++++++++------
2 files changed, 87 insertions(+), 15 deletions(-)

--
2.34.1