提交 e0fdace1 编写于 作者: D David Miller 提交者: Ingo Molnar

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: NDavid S. Miller <davem@davemloft.net>
Signed-off-by: NIngo Molnar <mingo@elte.hu>
上级 419ca3f1
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
* *
* Copyright (C) 2006 Red Hat, Inc., Ingo Molnar <mingo@redhat.com> * Copyright (C) 2006 Red Hat, Inc., Ingo Molnar <mingo@redhat.com>
*/ */
#include <linux/kernel.h>
#include <linux/rwsem.h> #include <linux/rwsem.h>
#include <linux/mutex.h> #include <linux/mutex.h>
#include <linux/module.h> #include <linux/module.h>
...@@ -37,6 +38,7 @@ int debug_locks_off(void) ...@@ -37,6 +38,7 @@ int debug_locks_off(void)
{ {
if (xchg(&debug_locks, 0)) { if (xchg(&debug_locks, 0)) {
if (!debug_locks_silent) { if (!debug_locks_silent) {
oops_in_progress = 1;
console_verbose(); console_verbose();
return 1; return 1;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册