lkml.org 
[lkml]   [2013]   [Mar]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Subject[PATCH 0/2] tighten lglock lockdep annotations
Date
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(-)

--
1.8.1.3


\
 
 \ /
  Last update: 2013-03-05 04:01    [W:0.178 / U:0.020 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site