debug_locks: set oops_in_progress if we will log messages.
authorDavid Miller <davem@davemloft.net>
Fri, 1 Aug 2008 08:11:22 +0000 (01:11 -0700)
committerIngo Molnar <mingo@elte.hu>
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 <davem@davemloft.net>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
lib/debug_locks.c

index 0ef01d14727c03c9861175e010e6f7c75c0d693f..0218b4693dd8c250f83c741bf6ffbfbbca31f94b 100644 (file)
@@ -8,6 +8,7 @@
  *
  *  Copyright (C) 2006 Red Hat, Inc., Ingo Molnar <mingo@redhat.com>
  */
+#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;
                }