File tree Expand file tree Collapse file tree 2 files changed +8
-5
lines changed Expand file tree Collapse file tree 2 files changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -343,6 +343,8 @@ extern void lockdep_trace_alloc(gfp_t mask);
343
343
344
344
#define lockdep_assert_held (l ) WARN_ON(debug_locks && !lockdep_is_held(l))
345
345
346
+ #define lockdep_recursing (tsk ) ((tsk)->lockdep_recursion)
347
+
346
348
#else /* !LOCKDEP */
347
349
348
350
static inline void lockdep_off (void )
@@ -392,6 +394,8 @@ struct lock_class_key { };
392
394
393
395
#define lockdep_assert_held (l ) do { } while (0)
394
396
397
+ #define lockdep_recursing (tsk ) (0)
398
+
395
399
#endif /* !LOCKDEP */
396
400
397
401
#ifdef CONFIG_LOCK_STAT
Original file line number Diff line number Diff line change @@ -688,6 +688,7 @@ static void zap_locks(void)
688
688
689
689
oops_timestamp = jiffies ;
690
690
691
+ debug_locks_off ();
691
692
/* If a crash is occurring, make sure we can't deadlock */
692
693
raw_spin_lock_init (& logbuf_lock );
693
694
/* And make sure that we print immediately */
@@ -840,9 +841,8 @@ asmlinkage int vprintk(const char *fmt, va_list args)
840
841
boot_delay_msec ();
841
842
printk_delay ();
842
843
843
- preempt_disable ();
844
844
/* This stops the holder of console_sem just where we want him */
845
- raw_local_irq_save (flags );
845
+ local_irq_save (flags );
846
846
this_cpu = smp_processor_id ();
847
847
848
848
/*
@@ -856,7 +856,7 @@ asmlinkage int vprintk(const char *fmt, va_list args)
856
856
* recursion and return - but flag the recursion so that
857
857
* it can be printed at the next appropriate moment:
858
858
*/
859
- if (!oops_in_progress ) {
859
+ if (!oops_in_progress && ! lockdep_recursing ( current ) ) {
860
860
recursion_bug = 1 ;
861
861
goto out_restore_irqs ;
862
862
}
@@ -962,9 +962,8 @@ asmlinkage int vprintk(const char *fmt, va_list args)
962
962
963
963
lockdep_on ();
964
964
out_restore_irqs :
965
- raw_local_irq_restore (flags );
965
+ local_irq_restore (flags );
966
966
967
- preempt_enable ();
968
967
return printed_len ;
969
968
}
970
969
EXPORT_SYMBOL (printk );
You can’t perform that action at this time.
0 commit comments