================================ WARNING: inconsistent lock state 6.0.0-rc6-syzkaller-00309-g1a61b828566f #0 Not tainted -------------------------------- inconsistent {HARDIRQ-ON-W} -> {IN-HARDIRQ-W} usage. udevd/3132 [HC1[1]:SC0[0]:HE0:SE1] takes: ffff88801f822018 (&clnt->lock){?.+.}-{2:2}, at: p9_tag_remove net/9p/client.c:367 [inline] ffff88801f822018 (&clnt->lock){?.+.}-{2:2}, at: p9_req_put net/9p/client.c:375 [inline] ffff88801f822018 (&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: 30913722 hardirqs last enabled at (30913721): [] slab_alloc mm/slab.c:3288 [inline] hardirqs last enabled at (30913721): [] __kmem_cache_alloc_lru mm/slab.c:3471 [inline] hardirqs last enabled at (30913721): [] kmem_cache_alloc_lru+0x44d/0x860 mm/slab.c:3498 hardirqs last disabled at (30913722): [] common_interrupt+0x11/0xc0 arch/x86/kernel/irq.c:240 softirqs last enabled at (30913712): [] invoke_softirq kernel/softirq.c:445 [inline] softirqs last enabled at (30913712): [] __irq_exit_rcu+0x123/0x180 kernel/softirq.c:650 softirqs last disabled at (30913707): [] invoke_softirq kernel/softirq.c:445 [inline] softirqs last disabled at (30913707): [] __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 *** 3 locks held by udevd/3132: #0: ffff8880290ac150 (&type->i_mutex_dir_key#4){++++}-{3:3}, at: inode_lock_shared include/linux/fs.h:766 [inline] #0: ffff8880290ac150 (&type->i_mutex_dir_key#4){++++}-{3:3}, at: open_last_lookups fs/namei.c:3480 [inline] #0: ffff8880290ac150 (&type->i_mutex_dir_key#4){++++}-{3:3}, at: path_openat+0x1514/0x28f0 fs/namei.c:3688 #1: ffff88801241cd48 (&root->kernfs_rwsem){++++}-{3:3}, at: kernfs_iop_lookup+0x9f/0x320 fs/kernfs/dir.c:1139 #2: ffff88804811c020 (&chan->lock#2){-...}-{2:2}, at: req_done+0xcf/0x2e0 net/9p/trans_virtio.c:139 stack backtrace: CPU: 0 PID: 3132 Comm: udevd Not tainted 6.0.0-rc6-syzkaller-00309-g1a61b828566f #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:prefetchw arch/x86/include/asm/processor.h:743 [inline] RIP: 0010:slab_alloc mm/slab.c:3290 [inline] RIP: 0010:__kmem_cache_alloc_lru mm/slab.c:3471 [inline] RIP: 0010:kmem_cache_alloc_lru+0x21b/0x860 mm/slab.c:3498 Code: 0f 84 50 01 00 00 4d 85 f6 4c 89 7c 24 10 0f 85 43 02 00 00 9c 58 f6 c4 02 0f 85 83 03 00 00 4d 85 f6 74 01 fb 48 8b 74 24 10 <0f> 18 0e 66 90 49 83 7c 24 50 00 74 4a 23 1d 96 d7 17 0c 31 c9 4c RSP: 0018:ffffc9000351f828 EFLAGS: 00000206 RAX: 0000000000000002 RBX: 0000000000000cc0 RCX: 1ffffffff211cd46 RDX: 0000000000000000 RSI: ffff888000a6b000 RDI: 0000000000000000 RBP: 0000000000000000 R08: 0000000000000001 R09: ffffffff908e194f R10: 0000000000000001 R11: 0000000000000000 R12: ffff8880121e1200 R13: 0000000000000cc0 R14: 0000000000000200 R15: ffff888000a6b000 alloc_inode_sb include/linux/fs.h:3103 [inline] alloc_inode+0x168/0x230 fs/inode.c:262 iget_locked+0x1b7/0x6f0 fs/inode.c:1287 kernfs_get_inode+0x47/0x520 fs/kernfs/inode.c:254 kernfs_iop_lookup+0x1e5/0x320 fs/kernfs/dir.c:1153 lookup_open.isra.0+0x76a/0x12a0 fs/namei.c:3391 open_last_lookups fs/namei.c:3481 [inline] path_openat+0x996/0x28f0 fs/namei.c:3688 do_filp_open+0x1b6/0x400 fs/namei.c:3718 do_sys_openat2+0x16d/0x4c0 fs/open.c:1313 do_sys_open fs/open.c:1329 [inline] __do_sys_openat fs/open.c:1345 [inline] __se_sys_openat fs/open.c:1340 [inline] __x64_sys_openat+0x13f/0x1f0 fs/open.c:1340 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:0x7f63b2998697 Code: 25 00 00 41 00 3d 00 00 41 00 74 37 64 8b 04 25 18 00 00 00 85 c0 75 5b 44 89 e2 48 89 ee bf 9c ff ff ff b8 01 01 00 00 0f 05 <48> 3d 00 f0 ff ff 0f 87 85 00 00 00 48 83 c4 68 5d 41 5c c3 0f 1f RSP: 002b:00007fff6e782160 EFLAGS: 00000246 ORIG_RAX: 0000000000000101 RAX: ffffffffffffffda RBX: 000055f61d995050 RCX: 00007f63b2998697 RDX: 0000000000080000 RSI: 00007fff6e782298 RDI: 00000000ffffff9c RBP: 00007fff6e782298 R08: 0000000000000008 R09: 0000000000000001 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000080000 R13: 000055f61d995050 R14: 0000000000000001 R15: 0000000000000000 ---------------- Code disassembly (best guess): 0: 0f 84 50 01 00 00 je 0x156 6: 4d 85 f6 test %r14,%r14 9: 4c 89 7c 24 10 mov %r15,0x10(%rsp) e: 0f 85 43 02 00 00 jne 0x257 14: 9c pushfq 15: 58 pop %rax 16: f6 c4 02 test $0x2,%ah 19: 0f 85 83 03 00 00 jne 0x3a2 1f: 4d 85 f6 test %r14,%r14 22: 74 01 je 0x25 24: fb sti 25: 48 8b 74 24 10 mov 0x10(%rsp),%rsi * 2a: 0f 18 0e prefetcht0 (%rsi) <-- trapping instruction 2d: 66 90 xchg %ax,%ax 2f: 49 83 7c 24 50 00 cmpq $0x0,0x50(%r12) 35: 74 4a je 0x81 37: 23 1d 96 d7 17 0c and 0xc17d796(%rip),%ebx # 0xc17d7d3 3d: 31 c9 xor %ecx,%ecx 3f: 4c rex.WR