Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 245406
b: refs/heads/master
c: 282b5c2
h: refs/heads/master
v: v3
  • Loading branch information
Steven Rostedt authored and Ingo Molnar committed Apr 22, 2011
1 parent 558abce commit 5469802
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 6be8c3935b914dfbc24b27c91c2b6d583645e61a
refs/heads/master: 282b5c2f6f663c008444321fd8fcdd374596046b
20 changes: 20 additions & 0 deletions trunk/kernel/lockdep.c
Original file line number Diff line number Diff line change
Expand Up @@ -2158,6 +2158,24 @@ static void check_chain_key(struct task_struct *curr)
#endif
}

static void
print_usage_bug_scenario(struct held_lock *lock)
{
struct lock_class *class = hlock_class(lock);

printk(" Possible unsafe locking scenario:\n\n");
printk(" CPU0\n");
printk(" ----\n");
printk(" lock(");
__print_lock_name(class);
printk(");\n");
printk(" <Interrupt>\n");
printk(" lock(");
__print_lock_name(class);
printk(");\n");
printk("\n *** DEADLOCK ***\n\n");
}

static int
print_usage_bug(struct task_struct *curr, struct held_lock *this,
enum lock_usage_bit prev_bit, enum lock_usage_bit new_bit)
Expand Down Expand Up @@ -2186,6 +2204,8 @@ print_usage_bug(struct task_struct *curr, struct held_lock *this,

print_irqtrace_events(curr);
printk("\nother info that might help us debug this:\n");
print_usage_bug_scenario(this);

lockdep_print_held_locks(curr);

printk("\nstack backtrace:\n");
Expand Down

0 comments on commit 5469802

Please sign in to comment.