The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Bart Van Assche <bvanassche@acm.org>
To: Peter Zijlstra <peterz@infradead.org>
Cc: Ingo Molnar <mingo@redhat.com>, Will Deacon <will@kernel.org>,
	Boqun Feng <boqun@kernel.org>, Waiman Long <longman@redhat.com>,
	linux-kernel@vger.kernel.org, Marco Elver <elver@google.com>,
	Christoph Hellwig <hch@lst.de>,
	Bart Van Assche <bvanassche@acm.org>
Subject: [PATCH 0/2] locking/rwlock: Fix non-debug lock context annotations
Date: Fri,  4 Dec 2026 13:58:05 -0800	[thread overview]
Message-ID: <cover.1796421357.git.bvanassche@acm.org> (raw)

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(-)


             reply	other threads:[~2026-12-04 21:58 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-12-04 21:58 Bart Van Assche [this message]
2026-12-04 21:58 ` [PATCH 1/2] locking/rwlock: Pass rwlock to __acquire*() and __release*() Bart Van Assche
2026-12-04 21:58 ` [PATCH 2/2] locking/rwlock: Report lock acquisition in non-debug do_raw_*_trylock() Bart Van Assche

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cover.1796421357.git.bvanassche@acm.org \
    --to=bvanassche@acm.org \
    --cc=boqun@kernel.org \
    --cc=elver@google.com \
    --cc=hch@lst.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=longman@redhat.com \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=will@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox