netlink: 156 bytes leftover after parsing attributes in process `syz-executor.0'. ============================================ WARNING: possible recursive locking detected 4.19.211-syzkaller #0 Not tainted -------------------------------------------- kworker/u4:3/108 is trying to acquire lock: 0000000033f6854e (&port_lock_key){-.-.}, at: uart_write+0x1ce/0x6f0 drivers/tty/serial/serial_core.c:591 but task is already holding lock: 0000000033f6854e (&port_lock_key){-.-.}, at: serial8250_handle_irq.part.0+0x21/0x3d0 drivers/tty/serial/8250/8250_port.c:1876 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 7 locks held by kworker/u4:3/108: #0: 00000000c22efbe8 ((wq_completion)"%s""bat_events"){+.+.}, at: process_one_work+0x767/0x1570 kernel/workqueue.c:2124 #1: 000000003d8d7d22 ((work_completion)(&(&bat_priv->nc.work)->work)){+.+.}, at: process_one_work+0x79c/0x1570 kernel/workqueue.c:2128 #2: 00000000505d9e83 (rcu_read_lock){....}, at: batadv_nc_purge_orig_hash net/batman-adv/network-coding.c:417 [inline] #2: 00000000505d9e83 (rcu_read_lock){....}, at: batadv_nc_worker+0xf3/0xd50 net/batman-adv/network-coding.c:730 #3: 00000000136ebbb0 (rcu_callback){....}, at: __rcu_reclaim kernel/rcu/rcu.h:226 [inline] #3: 00000000136ebbb0 (rcu_callback){....}, at: rcu_do_batch kernel/rcu/tree.c:2584 [inline] #3: 00000000136ebbb0 (rcu_callback){....}, at: invoke_rcu_callbacks kernel/rcu/tree.c:2897 [inline] #3: 00000000136ebbb0 (rcu_callback){....}, at: __rcu_process_callbacks kernel/rcu/tree.c:2864 [inline] #3: 00000000136ebbb0 (rcu_callback){....}, at: rcu_process_callbacks+0x9d0/0x18b0 kernel/rcu/tree.c:2881 #4: 000000000d4c5932 (&(&i->lock)->rlock){-.-.}, at: spin_lock include/linux/spinlock.h:329 [inline] #4: 000000000d4c5932 (&(&i->lock)->rlock){-.-.}, at: serial8250_interrupt+0x3a/0x240 drivers/tty/serial/8250/8250_core.c:115 #5: 0000000033f6854e (&port_lock_key){-.-.}, at: serial8250_handle_irq.part.0+0x21/0x3d0 drivers/tty/serial/8250/8250_port.c:1876 #6: 0000000075cc005e (&tty->ldisc_sem){++++}, at: tty_ldisc_ref+0x1d/0x80 drivers/tty/tty_ldisc.c:293 stack backtrace: CPU: 1 PID: 108 Comm: kworker/u4:3 Not tainted 4.19.211-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/26/2022 Workqueue: bat_events batadv_nc_worker Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x1fc/0x2ef lib/dump_stack.c:118 print_deadlock_bug kernel/locking/lockdep.c:1764 [inline] check_deadlock kernel/locking/lockdep.c:1808 [inline] validate_chain kernel/locking/lockdep.c:2404 [inline] __lock_acquire.cold+0x121/0x57e kernel/locking/lockdep.c:3416 lock_acquire+0x170/0x3c0 kernel/locking/lockdep.c:3908 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0x8c/0xc0 kernel/locking/spinlock.c:152 uart_write+0x1ce/0x6f0 drivers/tty/serial/serial_core.c:591 n_hdlc_send_frames+0x278/0x470 drivers/tty/n_hdlc.c:403 n_hdlc_tty_wakeup+0xa0/0xc0 drivers/tty/n_hdlc.c:479 tty_wakeup+0xd4/0x110 drivers/tty/tty_io.c:534 tty_port_default_wakeup+0x26/0x40 drivers/tty/tty_port.c:50 serial8250_tx_chars+0x490/0xaf0 drivers/tty/serial/8250/8250_port.c:1813 serial8250_handle_irq.part.0+0x31f/0x3d0 drivers/tty/serial/8250/8250_port.c:1900 serial8250_handle_irq drivers/tty/serial/8250/8250_port.c:1873 [inline] serial8250_default_handle_irq+0xae/0x220 drivers/tty/serial/8250/8250_port.c:1916 serial8250_interrupt+0x101/0x240 drivers/tty/serial/8250/8250_core.c:125 __handle_irq_event_percpu+0x27e/0x8e0 kernel/irq/handle.c:149 handle_irq_event_percpu kernel/irq/handle.c:189 [inline] handle_irq_event+0x102/0x290 kernel/irq/handle.c:206 handle_edge_irq+0x260/0xcf0 kernel/irq/chip.c:800 generic_handle_irq_desc include/linux/irqdesc.h:155 [inline] handle_irq+0x35/0x50 arch/x86/kernel/irq_64.c:87 do_IRQ+0x93/0x1c0 arch/x86/kernel/irq.c:246 common_interrupt+0xf/0xf arch/x86/entry/entry_64.S:670 RIP: 0010:arch_local_irq_restore arch/x86/include/asm/paravirt.h:789 [inline] RIP: 0010:kmem_cache_free+0x11c/0x260 mm/slab.c:3766 Code: 11 48 63 75 74 48 89 df e8 51 21 df 01 e9 68 ff ff ff e8 a7 80 cf ff 48 83 3d e7 59 59 08 00 0f 84 f8 00 00 00 4c 89 e7 57 9d <0f> 1f 44 00 00 eb 86 65 8b 05 76 58 69 7e 83 f8 07 0f 87 e7 00 00 RSP: 0018:ffff8880ba107df8 EFLAGS: 00000286 ORIG_RAX: ffffffffffffffd2 RAX: 0000000000000007 RBX: ffff88809a85b340 RCX: 1ffff11016984d2a RDX: 0000000000000000 RSI: ffff8880b4c26980 RDI: 0000000000000286 RBP: ffff88813be45200 R08: 0000000000400000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000286 R13: ffffffff8151491f R14: 000000000000000a R15: dffffc0000000000 __rcu_reclaim kernel/rcu/rcu.h:236 [inline] rcu_do_batch kernel/rcu/tree.c:2584 [inline] invoke_rcu_callbacks kernel/rcu/tree.c:2897 [inline] __rcu_process_callbacks kernel/rcu/tree.c:2864 [inline] rcu_process_callbacks+0x8ff/0x18b0 kernel/rcu/tree.c:2881 __do_softirq+0x265/0x980 kernel/softirq.c:292 invoke_softirq kernel/softirq.c:372 [inline] irq_exit+0x215/0x260 kernel/softirq.c:412 exiting_irq arch/x86/include/asm/apic.h:536 [inline] smp_apic_timer_interrupt+0x136/0x550 arch/x86/kernel/apic/apic.c:1098 apic_timer_interrupt+0xf/0x20 arch/x86/entry/entry_64.S:894 RIP: 0010:check_kcov_mode kernel/kcov.c:67 [inline] RIP: 0010:__sanitizer_cov_trace_pc+0x14/0x50 kernel/kcov.c:101 Code: 35 00 e9 23 fe ff ff 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 48 8b 34 24 65 48 8b 04 25 c0 df 01 00 65 8b 15 cc 59 9f 7e <81> e2 00 01 1f 00 75 2b 8b 90 60 13 00 00 83 fa 02 75 20 48 8b 88 RSP: 0018:ffff8880b4c17c50 EFLAGS: 00000202 ORIG_RAX: ffffffffffffff13 RAX: ffff8880b4c26080 RBX: 0000000000000001 RCX: ffffffff83771e23 RDX: 0000000080000001 RSI: ffffffff83771e2c RDI: 0000000000000005 RBP: ffffffff88b3e120 R08: 00000000979eb7a2 R09: 0000000000000000 R10: 0000000000000005 R11: 0000000000000000 R12: 0000000000000001 R13: ffffffff88b3e0e0 R14: 0000000000000171 R15: ffff8880a44a3800 check_preemption_disabled+0x3c/0x280 lib/smp_processor_id.c:25 rcu_dynticks_curr_cpu_in_eqs kernel/rcu/tree.c:348 [inline] rcu_is_watching+0x12/0xc0 kernel/rcu/tree.c:1025 rcu_read_lock include/linux/rcupdate.h:628 [inline] batadv_nc_purge_orig_hash net/batman-adv/network-coding.c:419 [inline] batadv_nc_worker+0x8ef/0xd50 net/batman-adv/network-coding.c:730 process_one_work+0x864/0x1570 kernel/workqueue.c:2153 worker_thread+0x64c/0x1130 kernel/workqueue.c:2296 kthread+0x33f/0x460 kernel/kthread.c:259 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:415 ---------------- Code disassembly (best guess): 0: 11 48 63 adc %ecx,0x63(%rax) 3: 75 74 jne 0x79 5: 48 89 df mov %rbx,%rdi 8: e8 51 21 df 01 callq 0x1df215e d: e9 68 ff ff ff jmpq 0xffffff7a 12: e8 a7 80 cf ff callq 0xffcf80be 17: 48 83 3d e7 59 59 08 cmpq $0x0,0x85959e7(%rip) # 0x8595a06 1e: 00 1f: 0f 84 f8 00 00 00 je 0x11d 25: 4c 89 e7 mov %r12,%rdi 28: 57 push %rdi 29: 9d popfq * 2a: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) <-- trapping instruction 2f: eb 86 jmp 0xffffffb7 31: 65 8b 05 76 58 69 7e mov %gs:0x7e695876(%rip),%eax # 0x7e6958ae 38: 83 f8 07 cmp $0x7,%eax 3b: 0f .byte 0xf 3c: 87 e7 xchg %esp,%edi