debug_locks: set oops_in_progress if we will log messages.
authorDavid Miller <[email protected]>
Fri, 1 Aug 2008 08:11:22 +0000 (01:11 -0700)
committerIngo Molnar <[email protected]>
Fri, 1 Aug 2008 08:46:43 +0000 (10:46 +0200)
Otherwise lock debugging messages on runqueue locks can deadlock the
system due to the wakeups performed by printk().

Signed-off-by: David S. Miller <[email protected]>
Signed-off-by: Ingo Molnar <[email protected]>
lib/debug_locks.c

index 0ef01d14727c03c9861175e010e6f7c75c0d693f..0218b4693dd8c250f83c741bf6ffbfbbca31f94b 100644 (file)
@@ -8,6 +8,7 @@
  *
  *  Copyright (C) 2006 Red Hat, Inc., Ingo Molnar <[email protected]>
  */
+#include <linux/kernel.h>
 #include <linux/rwsem.h>
 #include <linux/mutex.h>
 #include <linux/module.h>
@@ -37,6 +38,7 @@ int debug_locks_off(void)
 {
        if (xchg(&debug_locks, 0)) {
                if (!debug_locks_silent) {
+                       oops_in_progress = 1;
                        console_verbose();
                        return 1;
                }