================================ WARNING: inconsistent lock state 6.0.0-rc5-syzkaller #0 Not tainted -------------------------------- inconsistent {HARDIRQ-ON-W} -> {IN-HARDIRQ-W} usage. syz-executor.3/5370 [HC1[1]:SC0[0]:HE0:SE1] takes: ffff88801ba3c018 (&clnt->lock){?.+.}-{2:2}, at: p9_tag_remove net/9p/client.c:367 [inline] ffff88801ba3c018 (&clnt->lock){?.+.}-{2:2}, at: p9_req_put net/9p/client.c:375 [inline] ffff88801ba3c018 (&clnt->lock){?.+.}-{2:2}, at: p9_req_put+0xc6/0x250 net/9p/client.c:372 {HARDIRQ-ON-W} state was registered at: lock_acquire kernel/locking/lockdep.c:5666 [inline] lock_acquire+0x1ab/0x570 kernel/locking/lockdep.c:5631 __raw_spin_lock include/linux/spinlock_api_smp.h:133 [inline] _raw_spin_lock+0x2a/0x40 kernel/locking/spinlock.c:154 spin_lock include/linux/spinlock.h:349 [inline] p9_fd_request+0x85/0x330 net/9p/trans_fd.c:672 p9_client_rpc+0x2f0/0xce0 net/9p/client.c:660 p9_client_version net/9p/client.c:880 [inline] p9_client_create+0xaec/0x1070 net/9p/client.c:985 v9fs_session_init+0x1e2/0x1810 fs/9p/v9fs.c:408 v9fs_mount+0xba/0xc90 fs/9p/vfs_super.c:126 legacy_get_tree+0x105/0x220 fs/fs_context.c:610 vfs_get_tree+0x89/0x2f0 fs/super.c:1530 do_new_mount fs/namespace.c:3040 [inline] path_mount+0x1326/0x1e20 fs/namespace.c:3370 do_mount fs/namespace.c:3383 [inline] __do_sys_mount fs/namespace.c:3591 [inline] __se_sys_mount fs/namespace.c:3568 [inline] __ia32_sys_mount+0x27e/0x300 fs/namespace.c:3568 do_syscall_32_irqs_on arch/x86/entry/common.c:112 [inline] __do_fast_syscall_32+0x65/0xf0 arch/x86/entry/common.c:178 do_fast_syscall_32+0x2f/0x70 arch/x86/entry/common.c:203 entry_SYSENTER_compat_after_hwframe+0x70/0x82 irq event stamp: 142 hardirqs last enabled at (141): [] __raw_spin_unlock_irqrestore include/linux/spinlock_api_smp.h:151 [inline] hardirqs last enabled at (141): [] _raw_spin_unlock_irqrestore+0x50/0x70 kernel/locking/spinlock.c:194 hardirqs last disabled at (142): [] common_interrupt+0x11/0xc0 arch/x86/kernel/irq.c:240 softirqs last enabled at (0): [] copy_process+0x213e/0x7090 kernel/fork.c:2202 softirqs last disabled at (0): [<0000000000000000>] 0x0 other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(&clnt->lock); lock(&clnt->lock); *** DEADLOCK *** 1 lock held by syz-executor.3/5370: #0: ffff88801c930020 (&chan->lock#2){-...}-{2:2}, at: req_done+0xcf/0x2e0 net/9p/trans_virtio.c:139 stack backtrace: CPU: 1 PID: 5370 Comm: syz-executor.3 Not tainted 6.0.0-rc5-syzkaller #0 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.14.0-2 04/01/2014 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xcd/0x134 lib/dump_stack.c:106 print_usage_bug kernel/locking/lockdep.c:3961 [inline] valid_state kernel/locking/lockdep.c:3973 [inline] mark_lock_irq kernel/locking/lockdep.c:4176 [inline] mark_lock.part.0.cold+0x18/0xd8 kernel/locking/lockdep.c:4632 mark_lock kernel/locking/lockdep.c:4596 [inline] mark_usage kernel/locking/lockdep.c:4524 [inline] __lock_acquire+0x14a2/0x56d0 kernel/locking/lockdep.c:5007 lock_acquire kernel/locking/lockdep.c:5666 [inline] lock_acquire+0x1ab/0x570 kernel/locking/lockdep.c:5631 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0x39/0x50 kernel/locking/spinlock.c:162 p9_tag_remove net/9p/client.c:367 [inline] p9_req_put net/9p/client.c:375 [inline] p9_req_put+0xc6/0x250 net/9p/client.c:372 req_done+0x1de/0x2e0 net/9p/trans_virtio.c:148 vring_interrupt drivers/virtio/virtio_ring.c:2462 [inline] vring_interrupt+0x29d/0x3d0 drivers/virtio/virtio_ring.c:2437 __handle_irq_event_percpu+0x227/0x870 kernel/irq/handle.c:158 handle_irq_event_percpu kernel/irq/handle.c:193 [inline] handle_irq_event+0xa7/0x1e0 kernel/irq/handle.c:210 handle_edge_irq+0x25f/0xd00 kernel/irq/chip.c:819 generic_handle_irq_desc include/linux/irqdesc.h:158 [inline] handle_irq arch/x86/kernel/irq.c:231 [inline] __common_interrupt+0x9d/0x210 arch/x86/kernel/irq.c:250 common_interrupt+0xa4/0xc0 arch/x86/kernel/irq.c:240 asm_common_interrupt+0x22/0x40 arch/x86/include/asm/idtentry.h:640 RIP: 0010:__stack_depot_save+0x119/0x500 lib/stackdepot.c:435 Code: 44 31 c3 83 fe 03 77 92 83 fe 02 74 77 83 fe 03 74 6f 83 fe 01 74 70 48 8b 05 83 65 26 0d 89 d9 23 0d 87 65 26 0d 48 8d 0c c8 <48> 8b 29 48 85 ed 75 12 e9 92 00 00 00 48 8b 6d 00 48 85 ed 0f 84 RSP: 0018:ffffc9000298f9d8 EFLAGS: 00010202 RAX: ffff88807e200000 RBX: 000000004af1b349 RCX: ffff88807e2d9a48 RDX: 000000000000000e RSI: 0000000000000001 RDI: 00000000e7929e5a RBP: 0000000000000dc0 R08: 000000000ff97089 R09: 0000000000000000 R10: 0000000000000001 R11: 000000000008c07c R12: 0000000000000001 R13: 0000000000000dc0 R14: ffffc9000298fa48 R15: 000000000000000e kasan_save_stack+0x2e/0x40 mm/kasan/common.c:39 kasan_set_track mm/kasan/common.c:45 [inline] set_alloc_info mm/kasan/common.c:437 [inline] ____kasan_kmalloc mm/kasan/common.c:516 [inline] ____kasan_kmalloc mm/kasan/common.c:475 [inline] __kasan_kmalloc+0xa9/0xd0 mm/kasan/common.c:525 kmalloc include/linux/slab.h:600 [inline] kzalloc include/linux/slab.h:733 [inline] apparmor_sk_alloc_security+0x84/0x150 security/apparmor/lsm.c:812 security_sk_alloc+0x50/0xb0 security/security.c:2279 sk_prot_alloc+0x161/0x290 net/core/sock.c:1979 sk_alloc+0x36/0x770 net/core/sock.c:2029 __netlink_create+0x63/0x380 net/netlink/af_netlink.c:647 netlink_create+0x3ad/0x5e0 net/netlink/af_netlink.c:710 __sock_create+0x355/0x790 net/socket.c:1515 sock_create net/socket.c:1566 [inline] __sys_socket_create net/socket.c:1603 [inline] __sys_socket_create net/socket.c:1588 [inline] __sys_socket+0x12f/0x240 net/socket.c:1636 __do_sys_socket net/socket.c:1649 [inline] __se_sys_socket net/socket.c:1647 [inline] __ia32_sys_socket+0x6f/0xb0 net/socket.c:1647 do_syscall_32_irqs_on arch/x86/entry/common.c:112 [inline] __do_fast_syscall_32+0x65/0xf0 arch/x86/entry/common.c:178 do_fast_syscall_32+0x2f/0x70 arch/x86/entry/common.c:203 entry_SYSENTER_compat_after_hwframe+0x70/0x82 RIP: 0023:0xf7f7e549 Code: 03 74 c0 01 10 05 03 74 b8 01 10 06 03 74 b4 01 10 07 03 74 b0 01 10 08 03 74 d8 01 00 00 00 00 00 51 52 55 89 e5 0f 34 cd 80 <5d> 5a 59 c3 90 90 90 90 8d b4 26 00 00 00 00 8d b4 26 00 00 00 00 RSP: 002b:00000000f7f7957c EFLAGS: 00000246 ORIG_RAX: 0000000000000167 RAX: ffffffffffffffda RBX: 0000000000000010 RCX: 0000000000000003 RDX: 0000000000000010 RSI: 0000000000000001 RDI: 00000000f7f7960c RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000292 R12: 0000000000000000 R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 ---------------- Code disassembly (best guess): 0: 44 31 c3 xor %r8d,%ebx 3: 83 fe 03 cmp $0x3,%esi 6: 77 92 ja 0xffffff9a 8: 83 fe 02 cmp $0x2,%esi b: 74 77 je 0x84 d: 83 fe 03 cmp $0x3,%esi 10: 74 6f je 0x81 12: 83 fe 01 cmp $0x1,%esi 15: 74 70 je 0x87 17: 48 8b 05 83 65 26 0d mov 0xd266583(%rip),%rax # 0xd2665a1 1e: 89 d9 mov %ebx,%ecx 20: 23 0d 87 65 26 0d and 0xd266587(%rip),%ecx # 0xd2665ad 26: 48 8d 0c c8 lea (%rax,%rcx,8),%rcx * 2a: 48 8b 29 mov (%rcx),%rbp <-- trapping instruction 2d: 48 85 ed test %rbp,%rbp 30: 75 12 jne 0x44 32: e9 92 00 00 00 jmpq 0xc9 37: 48 8b 6d 00 mov 0x0(%rbp),%rbp 3b: 48 85 ed test %rbp,%rbp 3e: 0f .byte 0xf 3f: 84 .byte 0x84