x_tables: eb_tables: mark.0 target: invalid size 16 (kernel) != (user) 0 ============================================ WARNING: possible recursive locking detected 4.19.211-syzkaller #0 Not tainted -------------------------------------------- syz-executor.4/12558 is trying to acquire lock: 00000000a0788ba1 (&port_lock_key){-.-.}, at: uart_write+0x1ce/0x6f0 drivers/tty/serial/serial_core.c:591 but task is already holding lock: 00000000a0788ba1 (&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 3 locks held by syz-executor.4/12558: #0: 0000000073a7638f (&(&i->lock)->rlock){-.-.}, at: spin_lock include/linux/spinlock.h:329 [inline] #0: 0000000073a7638f (&(&i->lock)->rlock){-.-.}, at: serial8250_interrupt+0x3a/0x240 drivers/tty/serial/8250/8250_core.c:115 #1: 00000000a0788ba1 (&port_lock_key){-.-.}, at: serial8250_handle_irq.part.0+0x21/0x3d0 drivers/tty/serial/8250/8250_port.c:1876 #2: 0000000073c78f71 (&tty->ldisc_sem){++++}, at: tty_ldisc_ref+0x1d/0x80 drivers/tty/tty_ldisc.c:293 stack backtrace: CPU: 1 PID: 12558 Comm: syz-executor.4 Not tainted 4.19.211-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/22/2022 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:unwind_next_frame+0xa24/0x1400 arch/x86/kernel/unwind_orc.c:508 Code: ff ff 84 c0 0f 84 72 fa ff ff 48 b8 00 00 00 00 00 fc ff df 48 8b 14 24 4c 8b 64 24 68 4c 8b 44 24 30 48 c1 ea 03 80 3c 02 00 <0f> 85 8c 09 00 00 48 8b 54 24 08 4d 89 66 38 48 b8 00 00 00 00 00 RSP: 0018:ffff88803ad7f948 EFLAGS: 00000246 ORIG_RAX: ffffffffffffffd2 RAX: dffffc0000000000 RBX: 1ffff110075aff32 RCX: 0000000000000000 RDX: 1ffff110075aff56 RSI: ffff88803ad7f8d8 RDI: ffff88803ad7ff50 RBP: 0000000000000001 R08: ffffffff8b8cd908 R09: ffffffff8b8cd904 R10: ffff88803ad7fad7 R11: 0000000000074071 R12: ffff88803ad7ff58 R13: ffff88803ad7faad R14: ffff88803ad7fa78 R15: ffffffff8b8cd904 __save_stack_trace+0x9f/0x190 arch/x86/kernel/stacktrace.c:44 save_stack mm/kasan/kasan.c:448 [inline] set_track mm/kasan/kasan.c:460 [inline] kasan_kmalloc+0xeb/0x160 mm/kasan/kasan.c:553 slab_post_alloc_hook mm/slab.h:445 [inline] slab_alloc mm/slab.c:3397 [inline] kmem_cache_alloc+0x110/0x370 mm/slab.c:3557 sock_alloc_inode+0x19/0x250 net/socket.c:244 alloc_inode+0x5d/0x180 fs/inode.c:211 new_inode_pseudo+0x14/0xe0 fs/inode.c:911 sock_alloc+0x3c/0x260 net/socket.c:567 __sock_create+0xba/0x740 net/socket.c:1329 sock_create net/socket.c:1416 [inline] __sys_socket+0xef/0x200 net/socket.c:1458 __do_sys_socket net/socket.c:1467 [inline] __se_sys_socket net/socket.c:1465 [inline] __x64_sys_socket+0x6f/0xb0 net/socket.c:1465 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x7f6483a315a9 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f6482384168 EFLAGS: 00000246 ORIG_RAX: 0000000000000029 RAX: ffffffffffffffda RBX: 00007f6483b53050 RCX: 00007f6483a315a9 RDX: 0000000000000006 RSI: 0000000000000003 RDI: 000000000000000a RBP: 00007f6483a8c580 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007fff846cffff R14: 00007f6482384300 R15: 0000000000022000 ---------------- Code disassembly (best guess), 2 bytes skipped: 0: 84 c0 test %al,%al 2: 0f 84 72 fa ff ff je 0xfffffa7a 8: 48 b8 00 00 00 00 00 movabs $0xdffffc0000000000,%rax f: fc ff df 12: 48 8b 14 24 mov (%rsp),%rdx 16: 4c 8b 64 24 68 mov 0x68(%rsp),%r12 1b: 4c 8b 44 24 30 mov 0x30(%rsp),%r8 20: 48 c1 ea 03 shr $0x3,%rdx 24: 80 3c 02 00 cmpb $0x0,(%rdx,%rax,1) * 28: 0f 85 8c 09 00 00 jne 0x9ba <-- trapping instruction 2e: 48 8b 54 24 08 mov 0x8(%rsp),%rdx 33: 4d 89 66 38 mov %r12,0x38(%r14) 37: 48 rex.W 38: b8 00 00 00 00 mov $0x0,%eax