+ lockdep-lockdep_depth-vs-debug_locks-re-bug-workqueue-leaked-lock.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled
     lockdep: lockdep_depth vs. debug_locks
has been added to the -mm tree.  Its filename is
     lockdep-lockdep_depth-vs-debug_locks-re-bug-workqueue-leaked-lock.patch

*** Remember to use Documentation/SubmitChecklist when testing your code ***

See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find
out what to do about this

------------------------------------------------------
Subject: lockdep: lockdep_depth vs. debug_locks
From: Jarek Poplawski <jarkao2@xxxxx>

lockdep found a bug during a run of workqueue function - this could be also
caused by a bug from other code running simultaneously.

lockdep really shouldn't be used when debug_locks == 0!

Reported-by: Folkert van Heusden <folkert@xxxxxxxxxxxxxx>
Inspired-by: Oleg Nesterov <oleg@xxxxxxxxxx>
Signed-off-by: Jarek Poplawski <jarkao2@xxxxx>
Cc: Ingo Molnar <mingo@xxxxxxx>
Acked-by: Peter Zijlstra <a.p.zijlstra@xxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 include/linux/lockdep.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff -puN include/linux/lockdep.h~lockdep-lockdep_depth-vs-debug_locks-re-bug-workqueue-leaked-lock include/linux/lockdep.h
--- a/include/linux/lockdep.h~lockdep-lockdep_depth-vs-debug_locks-re-bug-workqueue-leaked-lock
+++ a/include/linux/lockdep.h
@@ -245,7 +245,7 @@ extern void lock_release(struct lockdep_
 
 # define INIT_LOCKDEP				.lockdep_recursion = 0,
 
-#define lockdep_depth(tsk)	((tsk)->lockdep_depth)
+#define lockdep_depth(tsk)	(debug_locks ? (tsk)->lockdep_depth : 0)
 
 #else /* !LOCKDEP */
 
_

Patches currently in -mm which might be from jarkao2@xxxxx are

lockdep-lockdep_depth-vs-debug_locks-re-bug-workqueue-leaked-lock.patch
lockdep-debug_show_all_locks-debug_show_held_locks-vs-debug_locks.patch

-
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux