Commit e0fdace10e75dac67d906213b780ff1b1a4cc360

Authored by David Miller
Committed by Ingo Molnar
1 parent 419ca3f135

debug_locks: set oops_in_progress if we will log messages.

Otherwise lock debugging messages on runqueue locks can deadlock the
system due to the wakeups performed by printk().

Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Ingo Molnar <mingo@elte.hu>

Showing 1 changed file with 2 additions and 0 deletions Side-by-side Diff

... ... @@ -8,6 +8,7 @@
8 8 *
9 9 * Copyright (C) 2006 Red Hat, Inc., Ingo Molnar <mingo@redhat.com>
10 10 */
  11 +#include <linux/kernel.h>
11 12 #include <linux/rwsem.h>
12 13 #include <linux/mutex.h>
13 14 #include <linux/module.h>
... ... @@ -37,6 +38,7 @@
37 38 {
38 39 if (xchg(&debug_locks, 0)) {
39 40 if (!debug_locks_silent) {
  41 + oops_in_progress = 1;
40 42 console_verbose();
41 43 return 1;
42 44 }