aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/printk.c
diff options
context:
space:
mode:
authorPeter Zijlstra <a.p.zijlstra@chello.nl>2011-06-07 05:17:30 -0400
committerIngo Molnar <mingo@elte.hu>2011-11-14 07:35:16 -0500
commit94d24fc47219219b5aa23b45956cc37ee5aa5b01 (patch)
treecc7f5fbf4f2e9c6243c9b3ce2439c2d3807d5f12 /kernel/printk.c
parent7f80850d3f9fd8fda23a317044aef3a6bafab06b (diff)
printk, lockdep: Disable lock debugging on zap_locks()
zap_locks() is used by printk() in a last ditch effort to get data out, clearly we cannot trust lock state after this so make it disable lock debugging. Also don't treat printk recursion through lockdep as a normal recursion bug but try hard to get the lockdep splat out. Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Link: http://lkml.kernel.org/n/tip-kqxwmo4xz37e1s8w0xopvr0q@git.kernel.org Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/printk.c')
-rw-r--r--kernel/printk.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/kernel/printk.c b/kernel/printk.c
index 1455a0d4eedd..6d087944e72a 100644
--- a/kernel/printk.c
+++ b/kernel/printk.c
@@ -688,6 +688,7 @@ static void zap_locks(void)
688 688
689 oops_timestamp = jiffies; 689 oops_timestamp = jiffies;
690 690
691 debug_locks_off();
691 /* If a crash is occurring, make sure we can't deadlock */ 692 /* If a crash is occurring, make sure we can't deadlock */
692 raw_spin_lock_init(&logbuf_lock); 693 raw_spin_lock_init(&logbuf_lock);
693 /* And make sure that we print immediately */ 694 /* And make sure that we print immediately */
@@ -856,7 +857,7 @@ asmlinkage int vprintk(const char *fmt, va_list args)
856 * recursion and return - but flag the recursion so that 857 * recursion and return - but flag the recursion so that
857 * it can be printed at the next appropriate moment: 858 * it can be printed at the next appropriate moment:
858 */ 859 */
859 if (!oops_in_progress) { 860 if (!oops_in_progress && !lockdep_recursing(current)) {
860 recursion_bug = 1; 861 recursion_bug = 1;
861 goto out_restore_irqs; 862 goto out_restore_irqs;
862 } 863 }