WARNING: inconsistent lock state 6.0.0-rc5-syzkaller-00097-g38eddeedbbea #0 Not tainted -------------------------------- inconsistent {HARDIRQ-ON-W} -> {IN-HARDIRQ-W} usage. syz-executor.2/22253 [HC1[1]:SC1[1]:HE0:SE0] takes: ffff888025aaa018 (&clnt->lock){?.+.}-{2:2}, at: p9_tag_remove net/9p/client.c:367 [inline] ffff888025aaa018 (&clnt->lock){?.+.}-{2:2}, at: p9_req_put net/9p/client.c:375 [inline] ffff888025aaa018 (&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] __x64_sys_mount+0x27f/0x300 fs/namespace.c:3568 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd irq event stamp: 87 hardirqs last enabled at (86): [] kmem_cache_free.part.0+0x1d3/0x2e0 mm/slab.c:3726 hardirqs last disabled at (87): [] 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 (25): [] invoke_softirq kernel/softirq.c:445 [inline] softirqs last disabled at (25): [] __irq_exit_rcu+0x123/0x180 kernel/softirq.c:650 other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(&clnt->lock); lock(&clnt->lock); *** DEADLOCK *** 2 locks held by syz-executor.2/22253: #0: ffffffff8bf867e0 (rcu_callback){....}-{0:0}, at: rcu_do_batch kernel/rcu/tree.c:2234 [inline] #0: ffffffff8bf867e0 (rcu_callback){....}-{0:0}, at: rcu_core+0x741/0x1890 kernel/rcu/tree.c:2505 #1: ffff888022480020 (&chan->lock#2){-.-.}-{2:2}, at: req_done+0xcf/0x2e0 net/9p/trans_virtio.c:139 stack backtrace: CPU: 0 PID: 22253 Comm: syz-executor.2 Not tainted 6.0.0-rc5-syzkaller-00097-g38eddeedbbea #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+0x4d/0xc0 arch/x86/kernel/irq.c:240 asm_common_interrupt+0x22/0x40 arch/x86/include/asm/idtentry.h:640 RIP: 0010:kmem_cache_free.part.0+0x141/0x2e0 mm/slab.c:3727 Code: 4c 89 ea 4c 89 e7 e8 ee c0 ff ff 48 85 db 0f 85 a3 00 00 00 9c 58 f6 c4 02 0f 85 7e 01 00 00 48 85 db 74 01 fb 48 8b 44 24 08 <65> 48 2b 04 25 28 00 00 00 0f 85 7c 01 00 00 48 83 c4 10 5b 5d 41 RSP: 0018:ffffc90000007e28 EFLAGS: 00000206 RAX: d2f33f2b413c4900 RBX: 0000000000000200 RCX: 1ffffffff1bbc1a9 RDX: 0000000000000000 RSI: 0000000000000101 RDI: 0000000000000000 RBP: ffffea0000a2cec0 R08: 0000000000000001 R09: 0000000000000001 R10: 0000000080000101 R11: 000000000008c07c R12: ffff888011853400 R13: ffffffff8166f935 R14: ffffc90000007ed8 R15: 0000000000000003 rcu_do_batch kernel/rcu/tree.c:2245 [inline] rcu_core+0x7b5/0x1890 kernel/rcu/tree.c:2505 __do_softirq+0x1d3/0x9c6 kernel/softirq.c:571 invoke_softirq kernel/softirq.c:445 [inline] __irq_exit_rcu+0x123/0x180 kernel/softirq.c:650 irq_exit_rcu+0x5/0x20 kernel/softirq.c:662 sysvec_apic_timer_interrupt+0x93/0xc0 arch/x86/kernel/apic/apic.c:1106 asm_sysvec_apic_timer_interrupt+0x16/0x20 arch/x86/include/asm/idtentry.h:649 RIP: 0010:__raw_spin_unlock_irqrestore include/linux/spinlock_api_smp.h:152 [inline] RIP: 0010:_raw_spin_unlock_irqrestore+0x38/0x70 kernel/locking/spinlock.c:194 Code: 74 24 10 e8 fa 86 db f7 48 89 ef e8 82 08 dc f7 81 e3 00 02 00 00 75 25 9c 58 f6 c4 02 75 2d 48 85 db 74 01 fb bf 01 00 00 00 c3 c9 ce f7 65 8b 05 ec 55 7f 76 85 c0 74 0a 5b 5d c3 e8 20 96 RSP: 0018:ffffc900034c7ea0 EFLAGS: 00000206 RAX: 0000000000000006 RBX: 0000000000000200 RCX: 1ffffffff1bbc1a9 RDX: 0000000000000000 RSI: 0000000000000001 RDI: 0000000000000001 RBP: ffff88801ac31e08 R08: 0000000000000001 R09: 0000000000000001 R10: ffffed10035863c1 R11: 0000000000000000 R12: ffff88801ac31e08 R13: 0000000000000000 R14: ffff88801ac31e00 R15: 0000000000000000 spin_unlock_irqrestore include/linux/spinlock.h:404 [inline] kcov_ioctl+0x378/0x6f0 kernel/kcov.c:734 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:870 [inline] __se_sys_ioctl fs/ioctl.c:856 [inline] __x64_sys_ioctl+0x193/0x200 fs/ioctl.c:856 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7efdf42891c7 Code: 3c 1c 48 f7 d8 49 39 c4 72 b8 e8 34 54 02 00 85 c0 78 bd 48 83 c4 08 4c 89 e0 5b 41 5c c3 0f 1f 44 00 00 b8 10 00 00 00 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:00007efdf54271e8 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007efdf42891c7 RDX: 0000000000000000 RSI: 0000000000006364 RDI: 00000000000000d8 RBP: 0000000000000000 R08: 00007efdf5427700 R09: 00007efdf5427700 R10: 00007efdf54279d0 R11: 0000000000000246 R12: 00007fff57d2929e R13: 00007fff57d2929f R14: 00007efdf5427300 R15: 0000000000022000 ---------------- Code disassembly (best guess): 0: 4c 89 ea mov %r13,%rdx 3: 4c 89 e7 mov %r12,%rdi 6: e8 ee c0 ff ff callq 0xffffc0f9 b: 48 85 db test %rbx,%rbx e: 0f 85 a3 00 00 00 jne 0xb7 14: 9c pushfq 15: 58 pop %rax 16: f6 c4 02 test $0x2,%ah 19: 0f 85 7e 01 00 00 jne 0x19d 1f: 48 85 db test %rbx,%rbx 22: 74 01 je 0x25 24: fb sti 25: 48 8b 44 24 08 mov 0x8(%rsp),%rax * 2a: 65 48 2b 04 25 28 00 sub %gs:0x28,%rax <-- trapping instruction 31: 00 00 33: 0f 85 7c 01 00 00 jne 0x1b5 39: 48 83 c4 10 add $0x10,%rsp 3d: 5b pop %rbx 3e: 5d pop %rbp 3f: 41 rex.B