]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/blobdiff - kernel/printk.c
printk, lockdep: Disable lock debugging on zap_locks()
[mirror_ubuntu-jammy-kernel.git] / kernel / printk.c
index 1455a0d4eedd4b386c759d689f939ba5d7a9007a..6d087944e72abc9dbb0b72066453764e67637dfe 100644 (file)
@@ -688,6 +688,7 @@ static void zap_locks(void)
 
        oops_timestamp = jiffies;
 
+       debug_locks_off();
        /* If a crash is occurring, make sure we can't deadlock */
        raw_spin_lock_init(&logbuf_lock);
        /* And make sure that we print immediately */
@@ -856,7 +857,7 @@ asmlinkage int vprintk(const char *fmt, va_list args)
                 * recursion and return - but flag the recursion so that
                 * it can be printed at the next appropriate moment:
                 */
-               if (!oops_in_progress) {
+               if (!oops_in_progress && !lockdep_recursing(current)) {
                        recursion_bug = 1;
                        goto out_restore_irqs;
                }