Skip to content

Commit

Permalink
debug_locks: set oops_in_progress if we will log messages.
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
davem330 authored and Ingo Molnar committed Aug 1, 2008
1 parent 419ca3f commit e0fdace
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/debug_locks.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -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;
}
Expand Down

0 comments on commit e0fdace

Please sign in to comment.