WARNING: inconsistent lock state 6.0.0-rc5-syzkaller-00017-gd1221cea11fc #0 Not tainted -------------------------------- inconsistent {HARDIRQ-ON-W} -> {IN-HARDIRQ-W} usage. syz-executor.2/23597 [HC1[1]:SC0[0]:HE0:SE1] takes: ffff88801f673818 (&clnt->lock){?.+.}-{2:2}, at: p9_tag_remove net/9p/client.c:367 [inline] ffff88801f673818 (&clnt->lock){?.+.}-{2:2}, at: p9_req_put net/9p/client.c:375 [inline] ffff88801f673818 (&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: 974 hardirqs last enabled at (973): [] raw_spin_rq_unlock_irq kernel/sched/sched.h:1367 [inline] hardirqs last enabled at (973): [] finish_lock_switch kernel/sched/core.c:4942 [inline] hardirqs last enabled at (973): [] finish_task_switch.isra.0+0x2b5/0xc70 kernel/sched/core.c:5060 hardirqs last disabled at (974): [] 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 *** 4 locks held by syz-executor.2/23597: #0: ffff888044812460 (sb_writers#5){.+.+}-{0:0}, at: filename_create+0xf1/0x4a0 fs/namei.c:3777 #1: ffff888027214480 (&type->i_mutex_dir_key#3/1){+.+.}-{3:3}, at: inode_lock_nested include/linux/fs.h:791 [inline] #1: ffff888027214480 (&type->i_mutex_dir_key#3/1){+.+.}-{3:3}, at: filename_create+0x1aa/0x4a0 fs/namei.c:3784 #2: ffffffff8bf86900 (rcu_read_lock){....}-{1:2}, at: xa_load+0x0/0x290 lib/xarray.c:1925 #3: ffff8880483b0020 (&chan->lock#2){-...}-{2:2}, at: req_done+0xcf/0x2e0 net/9p/trans_virtio.c:139 stack backtrace: CPU: 0 PID: 23597 Comm: syz-executor.2 Not tainted 6.0.0-rc5-syzkaller-00017-gd1221cea11fc #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:finish_task_switch.isra.0+0x2bf/0xc70 kernel/sched/core.c:5062 Code: 8b 3a 4c 89 e7 48 c7 02 00 00 00 00 ff d1 4d 85 ff 75 bf 4c 89 e7 e8 60 f8 ff ff e8 5b 49 2f 00 fb 65 48 8b 1c 25 80 6f 02 00 <48> 8d bb 98 15 00 00 48 b8 00 00 00 00 00 fc ff df 48 89 fa 48 c1 RSP: 0018:ffffc90004c2f540 EFLAGS: 00000202 RAX: 00000000000003cd RBX: ffff888025bd00c0 RCX: 1ffffffff21249de RDX: 0000000000000000 RSI: 0000000000000001 RDI: 0000000000000000 RBP: ffffc90004c2f588 R08: 0000000000000001 R09: ffffffff908e19f7 R10: 0000000000000001 R11: 0000000000000000 R12: ffff88802c83a000 R13: ffff888044950140 R14: 0000000000000000 R15: ffff88802c83aa38 context_switch kernel/sched/core.c:5185 [inline] __schedule+0xae7/0x52b0 kernel/sched/core.c:6494 preempt_schedule_irq+0x4e/0x90 kernel/sched/core.c:6806 irqentry_exit+0x31/0x80 kernel/entry/common.c:428 asm_sysvec_apic_timer_interrupt+0x16/0x20 arch/x86/include/asm/idtentry.h:649 RIP: 0010:xa_entry include/linux/xarray.h:1198 [inline] RIP: 0010:xas_descend+0xa4/0x440 lib/xarray.c:204 Code: 05 e8 b0 ef 56 fd 44 89 e9 48 89 da 48 b8 00 00 00 00 00 fc ff df 48 d3 ed 48 c1 ea 03 83 e5 3f 80 3c 02 00 0f 85 50 03 00 00 <83> fd 40 4c 8b 33 41 89 ed 0f 87 2d 03 00 00 4b 8d 7c ec 28 48 b8 RSP: 0018:ffffc90004c2f7a8 EFLAGS: 00000246 RAX: dffffc0000000000 RBX: ffffc90004c2f848 RCX: 0000000000000000 RDX: 1ffff92000985f09 RSI: ffffffff84244870 RDI: 0000000000000001 RBP: 0000000000000003 R08: 0000000000000001 R09: 000000000000003f R10: 0000000000000000 R11: 0000000000000000 R12: ffff8880289fbcc0 R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 xas_load+0xe5/0x140 lib/xarray.c:242 xa_load+0xf7/0x290 lib/xarray.c:1463 memcg_list_lru_allocated mm/list_lru.c:469 [inline] memcg_list_lru_alloc+0x1a5/0xae0 mm/list_lru.c:483 memcg_slab_pre_alloc_hook mm/slab.h:489 [inline] slab_pre_alloc_hook mm/slab.h:705 [inline] slab_alloc mm/slab.c:3278 [inline] __kmem_cache_alloc_lru mm/slab.c:3471 [inline] kmem_cache_alloc_lru+0x107/0x860 mm/slab.c:3498 alloc_inode_sb include/linux/fs.h:3103 [inline] ext4_alloc_inode+0x24/0x650 fs/ext4/super.c:1327 alloc_inode+0x61/0x230 fs/inode.c:260 new_inode_pseudo fs/inode.c:1019 [inline] new_inode+0x27/0x270 fs/inode.c:1047 __ext4_new_inode+0x34b/0x5690 fs/ext4/ialloc.c:960 ext4_symlink+0x5a8/0xa00 fs/ext4/namei.c:3356 vfs_symlink fs/namei.c:4378 [inline] vfs_symlink+0x365/0x5b0 fs/namei.c:4363 do_symlinkat+0x261/0x2e0 fs/namei.c:4407 __do_sys_symlinkat fs/namei.c:4424 [inline] __se_sys_symlinkat fs/namei.c:4421 [inline] __x64_sys_symlinkat+0x93/0xc0 fs/namei.c:4421 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:0x7f3d30a88d17 Code: 73 01 c3 48 c7 c1 b8 ff ff ff f7 d8 64 89 01 48 83 c8 ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 b8 0a 01 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:00007ffe41ef9d28 EFLAGS: 00000202 ORIG_RAX: 000000000000010a RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f3d30a88d17 RDX: 00007f3d30ae4408 RSI: 00000000ffffff9c RDI: 00007f3d30ae3083 RBP: 0000000000000001 R08: 0000000000000000 R09: 00007ffe41ef97a0 R10: 0000000000000000 R11: 0000000000000202 R12: 0000000000000001 R13: 0000000000000000 R14: 0000000000000001 R15: 00007ffe41ef9df0 ---------------- Code disassembly (best guess): 0: 8b 3a mov (%rdx),%edi 2: 4c 89 e7 mov %r12,%rdi 5: 48 c7 02 00 00 00 00 movq $0x0,(%rdx) c: ff d1 callq *%rcx e: 4d 85 ff test %r15,%r15 11: 75 bf jne 0xffffffd2 13: 4c 89 e7 mov %r12,%rdi 16: e8 60 f8 ff ff callq 0xfffff87b 1b: e8 5b 49 2f 00 callq 0x2f497b 20: fb sti 21: 65 48 8b 1c 25 80 6f mov %gs:0x26f80,%rbx 28: 02 00 * 2a: 48 8d bb 98 15 00 00 lea 0x1598(%rbx),%rdi <-- trapping instruction 31: 48 b8 00 00 00 00 00 movabs $0xdffffc0000000000,%rax 38: fc ff df 3b: 48 89 fa mov %rdi,%rdx 3e: 48 rex.W 3f: c1 .byte 0xc1