Skip to content

tighten lglock lockdep annotations

Michel Lespinasse lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 5 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2lockdep: introduce lock_acquire_exclusive/shared helper macrosinclude/linux/lockdep.h+23 -693 replies
2/2lglock: update lockdep annotations to report recursive local lockskernel/lglock.c+6 -62 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/2] tighten lglock lockdep annotations

Oleg Nesterov recently noticed that the lockdep annotations in lglock.c are not sufficient to detect some obvious deadlocks, such as lg_local_lock(LOCK) + lg_local_lock(LOCK) or
spin_lock(X) + lg_local_lock(Y) vs lg_local_lock(Y) + spin_lock(X).

Both issues can be fixed by indicating to lockdep that lglock's local locks are not recursive.

Patch 1 introduces helper macros for lockdep annotations.

Patch 2 makes sure to use the appropriate helper macros to indicate that the lglock local lock is a shared, non-recursive lock.

Michel Lespinasse (2):
lockdep: introduce lock_acquire_exclusive/shared helper macros
lglock: update lockdep annotations to report recursive local locks

 include/linux/lockdep.h | 92 +++++++++++++------------------------------------
 kernel/lglock.c         | 12 +++----
 2 files changed, 29 insertions(+), 75 deletions(-)
Signature · 1 line
1.8.1.3