============================================ WARNING: possible recursive locking detected 5.6.0-rc3-syzkaller #0 Not tainted -------------------------------------------- kworker/u4:6/257 is trying to acquire lock: ffffffff8af24470 (&port_lock_key){-.-.}, at: uart_write+0x1b6/0x990 drivers/tty/serial/serial_core.c:592 but task is already holding lock: ffffffff8af24470 (&port_lock_key){-.-.}, at: serial8250_handle_irq+0x49/0x330 drivers/tty/serial/8250/8250_port.c:1822 other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(&port_lock_key); lock(&port_lock_key); *** DEADLOCK *** May be due to missing lock nesting notation 6 locks held by kworker/u4:6/257: #0: ffff888214d79528 ((wq_completion)bat_events){+.+.}, at: spin_unlock_irq include/linux/spinlock.h:388 [inline] #0: ffff888214d79528 ((wq_completion)bat_events){+.+.}, at: process_one_work+0x763/0x10f0 kernel/workqueue.c:2237 #1: ffffc90001af7d78 ((work_completion)(&(&bat_priv->nc.work)->work)){+.+.}, at: process_one_work+0x7a5/0x10f0 kernel/workqueue.c:2239 #2: ffffffff892d9948 (rcu_read_lock){....}, at: rcu_lock_acquire+0x9/0x40 include/linux/rcupdate.h:207 #3: ffff88808f16e0b0 (&(&i->lock)->rlock){-.-.}, at: spin_lock include/linux/spinlock.h:338 [inline] #3: ffff88808f16e0b0 (&(&i->lock)->rlock){-.-.}, at: serial8250_interrupt+0x31/0x190 drivers/tty/serial/8250/8250_core.c:116 #4: ffffffff8af24470 (&port_lock_key){-.-.}, at: serial8250_handle_irq+0x49/0x330 drivers/tty/serial/8250/8250_port.c:1822 #5: ffff888089406090 (&tty->ldisc_sem){++++}, at: tty_ldisc_ref+0x1d/0x90 drivers/tty/tty_ldisc.c:288 stack backtrace: CPU: 1 PID: 257 Comm: kworker/u4:6 Not tainted 5.6.0-rc3-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Workqueue: bat_events batadv_nc_worker Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x1fb/0x318 lib/dump_stack.c:118 print_deadlock_bug kernel/locking/lockdep.c:2370 [inline] check_deadlock kernel/locking/lockdep.c:2411 [inline] validate_chain+0x61c1/0x7be0 kernel/locking/lockdep.c:2954 __lock_acquire+0xc5a/0x1bc0 kernel/locking/lockdep.c:3954 lock_acquire+0x154/0x250 kernel/locking/lockdep.c:4484 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0xa1/0xc0 kernel/locking/spinlock.c:159 uart_write+0x1b6/0x990 drivers/tty/serial/serial_core.c:592 n_hdlc_send_frames+0x434/0xbe0 drivers/tty/n_hdlc.c:401 n_hdlc_tty_wakeup+0xaa/0xe0 drivers/tty/n_hdlc.c:477 tty_wakeup+0xb7/0x100 drivers/tty/tty_io.c:536 tty_port_default_wakeup+0x2a/0x40 drivers/tty/tty_port.c:50 tty_port_tty_wakeup+0x5a/0x70 drivers/tty/tty_port.c:388 uart_write_wakeup+0x48/0x60 drivers/tty/serial/serial_core.c:104 serial8250_tx_chars+0x61e/0x830 drivers/tty/serial/8250/8250_port.c:1760 serial8250_handle_irq+0x27f/0x330 drivers/tty/serial/8250/8250_port.c:1833 serial8250_default_handle_irq+0xc5/0x1d0 drivers/tty/serial/8250/8250_port.c:1849 serial8250_interrupt+0xa4/0x190 drivers/tty/serial/8250/8250_core.c:126 __handle_irq_event_percpu+0x10e/0x580 kernel/irq/handle.c:149 handle_irq_event_percpu kernel/irq/handle.c:189 [inline] handle_irq_event+0xbe/0x280 kernel/irq/handle.c:206 handle_edge_irq+0x28a/0xc90 kernel/irq/chip.c:830 generic_handle_irq_desc include/linux/irqdesc.h:156 [inline] do_IRQ+0xfb/0x1e0 arch/x86/kernel/irq.c:250 common_interrupt+0xf/0xf arch/x86/entry/entry_64.S:607 RIP: 0010:debug_lockdep_rcu_enabled+0x68/0xe0 kernel/rcu/update.c:252 Code: 04 38 84 c0 75 59 83 3d 25 6b 06 08 00 74 28 65 4c 8b 34 25 c0 1d 02 00 49 81 c6 94 08 00 00 4c 89 f0 48 c1 e8 03 42 8a 04 38 <84> c0 75 59 31 db 41 83 3e 00 0f 94 c3 89 d8 5b 41 5e 41 5f 5d c3 RSP: 0018:ffffc90001af7c50 EFLAGS: 00000a07 ORIG_RAX: ffffffffffffffda RAX: 1ffff11015108900 RBX: 0000000000000000 RCX: 63bb3adb5ca9b58a RDX: dffffc0000000000 RSI: ffff8880a8844968 RDI: 0000000000000286 RBP: ffffc90001af7c68 R08: dffffc0000000000 R09: fffffbfff1406515 R10: fffffbfff1406515 R11: 0000000000000000 R12: dffffc0000000000 R13: ffff888095c8cb80 R14: ffff8880a8844914 R15: dffffc0000000000 rcu_read_lock include/linux/rcupdate.h:602 [inline] batadv_nc_purge_orig_hash net/batman-adv/network-coding.c:407 [inline] batadv_nc_worker+0xcc/0x5f0 net/batman-adv/network-coding.c:718 process_one_work+0x7f5/0x10f0 kernel/workqueue.c:2264 worker_thread+0xbbc/0x1630 kernel/workqueue.c:2410 kthread+0x332/0x350 kernel/kthread.c:255 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:352