[PATCH v2 0/4] Lock context annotation fixes

Bart Van Assche posted 4 patches 1 month, 2 weeks ago
include/linux/lockdep.h        | 12 ++++++------
include/linux/rwlock.h         |  4 ++--
include/linux/rwlock_api_smp.h |  6 ++++--
include/linux/sched/signal.h   |  2 +-
include/linux/spinlock.h       |  3 ++-
include/linux/ww_mutex.h       |  4 ++--
lib/test_context-analysis.c    |  6 +++---
mm/kfence/report.c             |  1 +
8 files changed, 21 insertions(+), 17 deletions(-)
[PATCH v2 0/4] Lock context annotation fixes
Posted by Bart Van Assche 1 month, 2 weeks ago
Hi Peter,

Some of the lock context annotations that have been introduced during the most
recent merge window were incomplete or incorrect. Hence this patch series with
fixes. Please consider this patch series for the current kernel development
cycle.

Thanks,

Bart.

Changes compared to v1:
 - Expanded Cc-list. Added the linux-kernel mailing list and more kernel developers
   to the Cc-list.
 - Added Maarten's Acked-by to patch 3/4.

Bart Van Assche (4):
  locking: Fix rwlock and spinlock lock context annotations
  signal: Fix the lock_task_sighand() annotation
  ww-mutex: Fix the ww_acquire_ctx function annotations
  Revert "lockdep: Annotate lockdep assertions for context analysis"

 include/linux/lockdep.h        | 12 ++++++------
 include/linux/rwlock.h         |  4 ++--
 include/linux/rwlock_api_smp.h |  6 ++++--
 include/linux/sched/signal.h   |  2 +-
 include/linux/spinlock.h       |  3 ++-
 include/linux/ww_mutex.h       |  4 ++--
 lib/test_context-analysis.c    |  6 +++---
 mm/kfence/report.c             |  1 +
 8 files changed, 21 insertions(+), 17 deletions(-)
Re: [PATCH v2 0/4] Lock context annotation fixes
Posted by Marco Elver 1 month, 2 weeks ago
On Wed, 25 Feb 2026 at 19:33, Bart Van Assche <bvanassche@acm.org> wrote:
>
> Hi Peter,
>
> Some of the lock context annotations that have been introduced during the most
> recent merge window were incomplete or incorrect. Hence this patch series with
> fixes. Please consider this patch series for the current kernel development
> cycle.
>
> Thanks,
>
> Bart.
>
> Changes compared to v1:
>  - Expanded Cc-list. Added the linux-kernel mailing list and more kernel developers
>    to the Cc-list.
>  - Added Maarten's Acked-by to patch 3/4.
>
> Bart Van Assche (4):
>   locking: Fix rwlock and spinlock lock context annotations
>   signal: Fix the lock_task_sighand() annotation
>   ww-mutex: Fix the ww_acquire_ctx function annotations

I think the above look fine.

>   Revert "lockdep: Annotate lockdep assertions for context analysis"

But this one is a Nack - it makes the programming model worse. If
there are lockdep_assert'able locks, those just need to become
context_lock_structs.