bisecting fixing commit since 78d697fc93f98054e36a3ab76dca1a88802ba7be building syzkaller on b655d91b8cb3b60be16c940d7bf4b192c2624a7b testing commit 78d697fc93f98054e36a3ab76dca1a88802ba7be with gcc (GCC) 8.1.0 kernel signature: 574bb05edcdbe3d4a5e1b3f0db2dc33cbe27c3c7687a04c5849243c9b2eadae8 all runs: crashed: possible deadlock in uart_write testing current HEAD 3f2ecb86cb909da0b9157fd2952ad79924cbe5ae testing commit 3f2ecb86cb909da0b9157fd2952ad79924cbe5ae with gcc (GCC) 8.1.0 kernel signature: b5d5de2ba8005b4d463033135912715671d5f3433ff367c4d47bc519111c8702 all runs: crashed: possible deadlock in uart_write revisions tested: 2, total time: 30m56.121408242s (build: 18m56.697098987s, test: 10m42.072731412s) the crash still happens on HEAD commit msg: Linux 4.14.212 crash: possible deadlock in uart_write ============================================ WARNING: possible recursive locking detected 4.14.212-syzkaller #0 Not tainted -------------------------------------------- kworker/u4:6/6695 is trying to acquire lock: (&port_lock_key){-.-.}, at: [] uart_write+0xe8/0x500 drivers/tty/serial/serial_core.c:604 but task is already holding lock: (&port_lock_key){-.-.}, at: [] serial8250_handle_irq.part.25+0x1c/0x2e0 drivers/tty/serial/8250/8250_port.c:1873 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/6695: #0: ("%s""bat_events"){+.+.}, at: [] work_static include/linux/workqueue.h:199 [inline] #0: ("%s""bat_events"){+.+.}, at: [] set_work_data kernel/workqueue.c:619 [inline] #0: ("%s""bat_events"){+.+.}, at: [] set_work_pool_and_clear_pending kernel/workqueue.c:646 [inline] #0: ("%s""bat_events"){+.+.}, at: [] process_one_work+0x6cd/0x16c0 kernel/workqueue.c:2087 #1: ((&(&bat_priv->nc.work)->work)){+.+.}, at: [] process_one_work+0x703/0x16c0 kernel/workqueue.c:2091 #2: (rcu_read_lock){....}, at: [] batadv_nc_purge_orig_hash net/batman-adv/network-coding.c:414 [inline] #2: (rcu_read_lock){....}, at: [] batadv_nc_worker+0xbf/0x630 net/batman-adv/network-coding.c:726 #3: (&(&i->lock)->rlock){-.-.}, at: [] spin_lock include/linux/spinlock.h:317 [inline] #3: (&(&i->lock)->rlock){-.-.}, at: [] serial8250_interrupt+0x27/0x170 drivers/tty/serial/8250/8250_core.c:119 #4: (&port_lock_key){-.-.}, at: [] serial8250_handle_irq.part.25+0x1c/0x2e0 drivers/tty/serial/8250/8250_port.c:1873 #5: (&tty->ldisc_sem){++++}, at: [] tty_ldisc_ref+0x1a/0x70 drivers/tty/tty_ldisc.c:305 stack backtrace: CPU: 0 PID: 6695 Comm: kworker/u4:6 Not tainted 4.14.212-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+0xf7/0x13b 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.75+0x2ef/0x887 kernel/locking/lockdep.c:3491 lock_acquire+0x173/0x400 kernel/locking/lockdep.c:3998 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0x99/0xd0 kernel/locking/spinlock.c:160 uart_write+0xe8/0x500 drivers/tty/serial/serial_core.c:604 n_hdlc_send_frames+0x201/0x3d0 drivers/tty/n_hdlc.c:404 n_hdlc_tty_wakeup+0x7d/0x90 drivers/tty/n_hdlc.c:480 tty_wakeup+0xaf/0xe0 drivers/tty/tty_io.c:533 tty_port_default_wakeup+0x1a/0x30 drivers/tty/tty_port.c:49 tty_port_tty_wakeup+0x53/0x70 drivers/tty/tty_port.c:390 uart_write_wakeup+0x37/0x50 drivers/tty/serial/serial_core.c:116 serial8250_tx_chars+0x3dc/0x9e0 drivers/tty/serial/8250/8250_port.c:1810 serial8250_handle_irq.part.25+0x223/0x2e0 drivers/tty/serial/8250/8250_port.c:1897 serial8250_handle_irq drivers/tty/serial/8250/8250_port.c:1870 [inline] serial8250_default_handle_irq+0x7c/0xe0 drivers/tty/serial/8250/8250_port.c:1913 serial8250_interrupt+0xd3/0x170 drivers/tty/serial/8250/8250_core.c:129 __handle_irq_event_percpu+0xff/0x6c0 kernel/irq/handle.c:147 handle_irq_event_percpu+0x64/0x120 kernel/irq/handle.c:187 handle_irq_event+0xa2/0x130 kernel/irq/handle.c:204 handle_edge_irq+0x206/0x780 kernel/irq/chip.c:770 generic_handle_irq_desc include/linux/irqdesc.h:159 [inline] handle_irq+0x37/0x50 arch/x86/kernel/irq_64.c:87 do_IRQ+0x98/0x1d0 arch/x86/kernel/irq.c:230 common_interrupt+0x9a/0x9a 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+0x1f1/0x400 kernel/locking/lockdep.c:4001 RSP: 0018:ffff8881df937cb8 EFLAGS: 00000282 ORIG_RAX: ffffffffffffffc8 RAX: dffffc0000000000 RBX: ffff8881e22221c0 RCX: ffff8881e2222a48 RDX: 1ffffffff0fe2be9 RSI: ffff8881e2222a98 RDI: 0000000000000282 RBP: ffff8881df937d00 R08: ffff8881e2222ab8 R09: 0000000000000000 R10: 0000000000000050 R11: ffff8881e22221c0 R12: 0000000000000000 R13: 0000000000000002 R14: 0000000000000000 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:416 [inline] batadv_nc_worker+0xef/0x630 net/batman-adv/network-coding.c:726 process_one_work+0x79e/0x16c0 kernel/workqueue.c:2116 worker_thread+0xcc/0xee0 kernel/workqueue.c:2250 kthread+0x338/0x400 kernel/kthread.c:232 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:404