audit: type=1804 audit(1654210246.061:44): pid=9845 uid=0 auid=4294967295 ses=4294967295 op="invalid_pcr" cause="open_writers" comm="syz-executor.3" name="/root/syzkaller-testdir1499731901/syzkaller.269NKZ/14/bus" dev="sda1" ino=13990 res=1 ============================================ WARNING: possible recursive locking detected 4.14.281-syzkaller #0 Not tainted -------------------------------------------- kworker/u4:6/9355 is trying to acquire lock: (&port_lock_key){-.-.}, at: [] uart_write+0x109/0x560 drivers/tty/serial/serial_core.c:611 but task is already holding lock: (&port_lock_key){-.-.}, at: [] serial8250_handle_irq.part.0+0x20/0x330 drivers/tty/serial/8250/8250_port.c:1889 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/9355: #0: ("%s""bat_events"){+.+.}, at: [] process_one_work+0x6b0/0x14a0 kernel/workqueue.c:2088 #1: ((&(&bat_priv->nc.work)->work)){+.+.}, at: [] process_one_work+0x6e6/0x14a0 kernel/workqueue.c:2092 #2: (rcu_read_lock){....}, at: [] batadv_nc_purge_orig_hash net/batman-adv/network-coding.c:416 [inline] #2: (rcu_read_lock){....}, at: [] batadv_nc_worker+0xea/0xc50 net/batman-adv/network-coding.c:728 #3: (&(&i->lock)->rlock){-.-.}, at: [] spin_lock include/linux/spinlock.h:317 [inline] #3: (&(&i->lock)->rlock){-.-.}, at: [] serial8250_interrupt+0x3a/0x210 drivers/tty/serial/8250/8250_core.c:119 #4: (&port_lock_key){-.-.}, at: [] serial8250_handle_irq.part.0+0x20/0x330 drivers/tty/serial/8250/8250_port.c:1889 #5: (&tty->ldisc_sem){++++}, at: [] tty_ldisc_ref+0x1b/0x80 drivers/tty/tty_ldisc.c:305 stack backtrace: CPU: 1 PID: 9355 Comm: kworker/u4:6 Not tainted 4.14.281-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:17 [inline] dump_stack+0x1b2/0x281 lib/dump_stack.c:58 print_deadlock_bug kernel/locking/lockdep.c:1800 [inline] check_deadlock kernel/locking/lockdep.c:1847 [inline] validate_chain kernel/locking/lockdep.c:2448 [inline] __lock_acquire.cold+0x180/0x97c kernel/locking/lockdep.c:3491 lock_acquire+0x170/0x3f0 kernel/locking/lockdep.c:3998 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0x8c/0xc0 kernel/locking/spinlock.c:160 uart_write+0x109/0x560 drivers/tty/serial/serial_core.c:611 n_hdlc_send_frames+0x241/0x410 drivers/tty/n_hdlc.c:404 n_hdlc_tty_wakeup+0x95/0xb0 drivers/tty/n_hdlc.c:480 tty_wakeup+0xc3/0xf0 drivers/tty/tty_io.c:533 tty_port_default_wakeup+0x26/0x40 drivers/tty/tty_port.c:49 serial8250_tx_chars+0x3fe/0xbe0 drivers/tty/serial/8250/8250_port.c:1826 serial8250_handle_irq.part.0+0x28d/0x330 drivers/tty/serial/8250/8250_port.c:1913 serial8250_handle_irq drivers/tty/serial/8250/8250_port.c:1886 [inline] serial8250_default_handle_irq+0x8a/0x1f0 drivers/tty/serial/8250/8250_port.c:1929 serial8250_interrupt+0xf3/0x210 drivers/tty/serial/8250/8250_core.c:129 __handle_irq_event_percpu+0xee/0x7f0 kernel/irq/handle.c:147 handle_irq_event_percpu kernel/irq/handle.c:187 [inline] handle_irq_event+0xf0/0x250 kernel/irq/handle.c:204 handle_edge_irq+0x224/0xc40 kernel/irq/chip.c:770 generic_handle_irq_desc include/linux/irqdesc.h:159 [inline] handle_irq+0x35/0x50 arch/x86/kernel/irq_64.c:87 do_IRQ+0x93/0x1d0 arch/x86/kernel/irq.c:230 common_interrupt+0x93/0x93 arch/x86/entry/entry_64.S:576 RIP: 0010:arch_local_irq_restore arch/x86/include/asm/paravirt.h:779 [inline] RIP: 0010:lock_acquire+0x1ec/0x3f0 kernel/locking/lockdep.c:4001 RSP: 0018:ffff888073a87c80 EFLAGS: 00000282 ORIG_RAX: ffffffffffffffc8 RAX: 1ffffffff11e1311 RBX: ffff888073aae380 RCX: 1d257d9632af8c24 RDX: dffffc0000000000 RSI: 0000000000000001 RDI: 0000000000000282 RBP: ffffffff88f77ec0 R08: 0000000000000000 R09: 0000000000020012 R10: ffff888073aaec58 R11: ffff888073aae380 R12: 0000000000000000 R13: 0000000000000000 R14: 0000000000000002 R15: 0000000000000000 rcu_lock_acquire include/linux/rcupdate.h:242 [inline] rcu_read_lock include/linux/rcupdate.h:629 [inline] batadv_nc_purge_orig_hash net/batman-adv/network-coding.c:418 [inline] batadv_nc_worker+0x124/0xc50 net/batman-adv/network-coding.c:728 process_one_work+0x793/0x14a0 kernel/workqueue.c:2117 worker_thread+0x5cc/0xff0 kernel/workqueue.c:2251 kthread+0x30d/0x420 kernel/kthread.c:232 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:404