• S
    lockdep: Print a nicer description for normal deadlocks · f4185812
    Steven Rostedt 提交于
    The lockdep output can be pretty cryptic, having nicer output
    can save a lot of head scratching. When a normal deadlock
    scenario is detected by lockdep (lock A -> lock B and there
    exists a place where lock B -> lock A) we now get the following
    new output:
    
    other info that might help us debug this:
    
     Possible unsafe locking scenario:
    
           CPU0                    CPU1
           ----                    ----
      lock(lockB);
                                   lock(lockA);
                                   lock(lockB);
      lock(lockA);
    
     *** DEADLOCK ***
    
    On cases where there's a deeper chair, it shows the partial
    chain that can cause the issue:
    
    Chain exists of:
      lockC --> lockA --> lockB
    
     Possible unsafe locking scenario:
    
           CPU0                    CPU1
           ----                    ----
      lock(lockB);
                                   lock(lockA);
                                   lock(lockB);
      lock(lockC);
    
     *** DEADLOCK ***
    Signed-off-by: NSteven Rostedt <rostedt@goodmis.org>
    Acked-by: NPeter Zijlstra <a.p.zijlstra@chello.nl>
    Cc: Frederic Weisbecker <fweisbec@gmail.com>
    Cc: Linus Torvalds <torvalds@linux-foundation.org>
    Cc: Andrew Morton <akpm@linux-foundation.org>
    Link: http://lkml.kernel.org/r/20110421014259.380621789@goodmis.orgSigned-off-by: NIngo Molnar <mingo@elte.hu>
    f4185812
lockdep.c 95.1 KB