================================ WARNING: inconsistent lock state 6.0.0-rc4-syzkaller-00331-g4ed9c1e971b1 #0 Not tainted -------------------------------- inconsistent {HARDIRQ-ON-W} -> {IN-HARDIRQ-W} usage. syz-executor.2/13736 [HC1[1]:SC0[0]:HE0:SE1] takes: ffff88801eb5d418 (&clnt->lock){?.+.}-{2:2}, at: p9_tag_remove net/9p/client.c:367 [inline] ffff88801eb5d418 (&clnt->lock){?.+.}-{2:2}, at: p9_req_put net/9p/client.c:375 [inline] ffff88801eb5d418 (&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: 1230 hardirqs last enabled at (1229): [] kfree+0x25b/0x390 mm/slab.c:3787 hardirqs last disabled at (1230): [] common_interrupt+0x11/0xc0 arch/x86/kernel/irq.c:240 softirqs last enabled at (544): [] spin_unlock_bh include/linux/spinlock.h:394 [inline] softirqs last enabled at (544): [] bdi_set_max_ratio+0xfc/0x140 mm/page-writeback.c:695 softirqs last disabled at (542): [] spin_lock_bh include/linux/spinlock.h:354 [inline] softirqs last disabled at (542): [] bdi_set_max_ratio+0x3a/0x140 mm/page-writeback.c:688 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/13736: #0: ffffffff8c114518 (sb_lock){+.+.}-{2:2}, at: spin_lock include/linux/spinlock.h:349 [inline] #0: ffffffff8c114518 (sb_lock){+.+.}-{2:2}, at: put_super fs/super.c:310 [inline] #0: ffffffff8c114518 (sb_lock){+.+.}-{2:2}, at: deactivate_locked_super+0xc0/0x160 fs/super.c:343 #1: ffff8880486ec020 (&chan->lock#2){-.-.}-{2:2}, at: req_done+0xcf/0x2e0 net/9p/trans_virtio.c:139 stack backtrace: CPU: 0 PID: 13736 Comm: syz-executor.2 Not tainted 6.0.0-rc4-syzkaller-00331-g4ed9c1e971b1 #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:kfree+0x1a5/0x390 mm/slab.c:3788 Code: 4c 89 f2 4c 89 ef e8 aa fa ff ff 4d 85 e4 0f 85 c7 00 00 00 9c 58 f6 c4 02 0f 85 c4 01 00 00 4d 85 e4 74 01 fb 48 8b 44 24 08 <65> 48 2b 04 25 28 00 00 00 0f 85 cb 01 00 00 48 83 c4 10 5b 5d 41 RSP: 0000:ffffc9000d827dc0 EFLAGS: 00000206 RAX: 044eb5bcaa34bb00 RBX: ffffea00006ba180 RCX: 1ffffffff211c98e RDX: 0000000000000000 RSI: 0000000000000001 RDI: 0000000000000000 RBP: ffffea00006ba180 R08: 0000000000000001 R09: ffffffff908df94f R10: 0000000000000001 R11: 000000000008c07c R12: 0000000000000200 R13: ffff888011840500 R14: ffffffff83b9c4c4 R15: ffff888014e10340 security_sb_free+0x84/0xe0 security/security.c:926 __put_super.part.0+0x1a1/0x350 fs/super.c:293 __put_super fs/super.c:347 [inline] put_super fs/super.c:311 [inline] deactivate_locked_super+0x13e/0x160 fs/super.c:343 deactivate_super+0xad/0xd0 fs/super.c:363 cleanup_mnt+0x2ae/0x3d0 fs/namespace.c:1186 task_work_run+0xdd/0x1a0 kernel/task_work.c:177 resume_user_mode_work include/linux/resume_user_mode.h:49 [inline] exit_to_user_mode_loop kernel/entry/common.c:169 [inline] exit_to_user_mode_prepare+0x23c/0x250 kernel/entry/common.c:201 __syscall_exit_to_user_mode_work kernel/entry/common.c:283 [inline] syscall_exit_to_user_mode+0x19/0x50 kernel/entry/common.c:294 do_syscall_64+0x42/0xb0 arch/x86/entry/common.c:86 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7f7b5dc893c9 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:00007f7b5ed40168 EFLAGS: 00000246 ORIG_RAX: 00000000000000a6 RAX: 0000000000000000 RBX: 00007f7b5dd9bf80 RCX: 00007f7b5dc893c9 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000020000180 RBP: 00007f7b5dce433f R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffcde26522f R14: 00007f7b5ed40300 R15: 0000000000022000 ---------------- Code disassembly (best guess): 0: 4c 89 f2 mov %r14,%rdx 3: 4c 89 ef mov %r13,%rdi 6: e8 aa fa ff ff callq 0xfffffab5 b: 4d 85 e4 test %r12,%r12 e: 0f 85 c7 00 00 00 jne 0xdb 14: 9c pushfq 15: 58 pop %rax 16: f6 c4 02 test $0x2,%ah 19: 0f 85 c4 01 00 00 jne 0x1e3 1f: 4d 85 e4 test %r12,%r12 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 cb 01 00 00 jne 0x204 39: 48 83 c4 10 add $0x10,%rsp 3d: 5b pop %rbx 3e: 5d pop %rbp 3f: 41 rex.B