|
@@ -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)
|
|
@@ -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");
|