]> git.itanic.dy.fi Git - linux-stable/commit
locking/lockdep: Implement the 'crossrelease' feature
authorByungchul Park <byungchul.park@lge.com>
Mon, 7 Aug 2017 07:12:52 +0000 (16:12 +0900)
committerIngo Molnar <mingo@kernel.org>
Thu, 10 Aug 2017 10:29:07 +0000 (12:29 +0200)
commitb09be676e0ff25bd6d2e7637e26d349f9109ad75
tree8dc82ceaa001d29bb07a51f5c4814759b303e8e4
parentce07a9415f266e181a0a33033a5f7138760240a4
locking/lockdep: Implement the 'crossrelease' feature

Lockdep is a runtime locking correctness validator that detects and
reports a deadlock or its possibility by checking dependencies between
locks. It's useful since it does not report just an actual deadlock but
also the possibility of a deadlock that has not actually happened yet.
That enables problems to be fixed before they affect real systems.

However, this facility is only applicable to typical locks, such as
spinlocks and mutexes, which are normally released within the context in
which they were acquired. However, synchronization primitives like page
locks or completions, which are allowed to be released in any context,
also create dependencies and can cause a deadlock.

So lockdep should track these locks to do a better job. The 'crossrelease'
implementation makes these primitives also be tracked.

Signed-off-by: Byungchul Park <byungchul.park@lge.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: akpm@linux-foundation.org
Cc: boqun.feng@gmail.com
Cc: kernel-team@lge.com
Cc: kirill@shutemov.name
Cc: npiggin@gmail.com
Cc: walken@google.com
Cc: willy@infradead.org
Link: http://lkml.kernel.org/r/1502089981-21272-6-git-send-email-byungchul.park@lge.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
include/linux/irqflags.h
include/linux/lockdep.h
include/linux/sched.h
kernel/exit.c
kernel/fork.c
kernel/locking/lockdep.c
kernel/workqueue.c
lib/Kconfig.debug