[PATCH 0/2] locking/rwlock: Fix non-debug lock context annotations
From: Bart Van Assche
Date: Fri Dec 04 2026 - 16:58:36 EST
Hi Peter and Marco,
This patch series fixes two issues in the lock context annotations of
the !CONFIG_DEBUG_SPINLOCK definitions of the rwlock primitives in
<linux/rwlock.h>:
- do_raw_{read,write}_lock() and do_raw_{read,write}_unlock() pass the
hardcoded identifier lock instead of the macro parameter rwlock to
__acquire*() and __release*().
- do_raw_{read,write}_trylock() use __no_context_analysis instead of
reporting lock acquisition explicitly, as do_raw_spin_trylock() does.
These patches have been build-tested with Clang 24 for x86_64 with
CONFIG_WARN_CONTEXT_ANALYSIS=y, both with and without CONFIG_PREEMPT_RT.
Please consider these patches for the next merge window.
Thank you,
Bart.
Bart Van Assche (2):
locking/rwlock: Pass rwlock to __acquire*() and __release*()
locking/rwlock: Report lock acquisition in non-debug
do_raw_*_trylock()
include/linux/rwlock.h | 24 ++++++++++++++++--------
1 file changed, 16 insertions(+), 8 deletions(-)