================================ WARNING: inconsistent lock state 6.0.0-rc4-syzkaller-00062-g0066f1b0e275 #0 Not tainted -------------------------------- inconsistent {HARDIRQ-ON-W} -> {IN-HARDIRQ-W} usage. syz-executor.3/32221 [HC1[1]:SC1[1]:HE0:SE0] takes: ffff88801e6bdc18 (&clnt->lock){?.+.}-{2:2}, at: p9_tag_remove net/9p/client.c:367 [inline] ffff88801e6bdc18 (&clnt->lock){?.+.}-{2:2}, at: p9_req_put net/9p/client.c:375 [inline] ffff88801e6bdc18 (&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: 661 hardirqs last enabled at (660): [] asm_sysvec_apic_timer_interrupt+0x16/0x20 arch/x86/include/asm/idtentry.h:649 hardirqs last disabled at (661): [] common_interrupt+0x11/0xc0 arch/x86/kernel/irq.c:240 softirqs last enabled at (524): [] rcu_read_unlock_bh include/linux/rcupdate.h:772 [inline] softirqs last enabled at (524): [] __dev_queue_xmit+0x1a0c/0x3ad0 net/core/dev.c:4283 softirqs last disabled at (647): [] invoke_softirq kernel/softirq.c:445 [inline] softirqs last disabled at (647): [] __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 syz-executor.3/32221: #0: ffff88801bdd3228 (&mm->mmap_lock#2){++++}-{3:3}, at: mmap_write_lock include/linux/mmap_lock.h:71 [inline] #0: ffff88801bdd3228 (&mm->mmap_lock#2){++++}-{3:3}, at: exit_mmap+0x10b/0x490 mm/mmap.c:3101 #1: ffff88801e6f8bb8 (ptlock_ptr(page)#2){+.+.}-{2:2}, at: spin_lock include/linux/spinlock.h:349 [inline] #1: ffff88801e6f8bb8 (ptlock_ptr(page)#2){+.+.}-{2:2}, at: zap_pte_range mm/memory.c:1418 [inline] #1: ffff88801e6f8bb8 (ptlock_ptr(page)#2){+.+.}-{2:2}, at: zap_pmd_range mm/memory.c:1575 [inline] #1: ffff88801e6f8bb8 (ptlock_ptr(page)#2){+.+.}-{2:2}, at: zap_pud_range mm/memory.c:1604 [inline] #1: ffff88801e6f8bb8 (ptlock_ptr(page)#2){+.+.}-{2:2}, at: zap_p4d_range mm/memory.c:1625 [inline] #1: ffff88801e6f8bb8 (ptlock_ptr(page)#2){+.+.}-{2:2}, at: unmap_page_range+0xaf2/0x3cc0 mm/memory.c:1646 #2: ffff888022e38020 (&chan->lock#2){-.-.}-{2:2}, at: req_done+0xcf/0x2e0 net/9p/trans_virtio.c:139 stack backtrace: CPU: 0 PID: 32221 Comm: syz-executor.3 Not tainted 6.0.0-rc4-syzkaller-00062-g0066f1b0e275 #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:__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 ca 2f dc f7 48 89 ef e8 52 b1 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 93 72 cf f7 65 8b 05 bc fe 7f 76 85 c0 74 0a 5b 5d c3 e8 00 40 RSP: 0018:ffffc90000007e18 EFLAGS: 00000206 RAX: 0000000000000002 RBX: 0000000000000200 RCX: 1ffffffff211c7ae RDX: 0000000000000000 RSI: 0000000000000102 RDI: 0000000000000001 RBP: ffffffff8bf90e40 R08: 0000000000000001 R09: ffffffff908dc957 R10: 0000000000000001 R11: 1ffff110059075f8 R12: ffffffff8bf90e40 R13: 0000000000000246 R14: 000000000001d87d R15: ffff88802c83aed2 note_gp_changes+0x150/0x1c0 kernel/rcu/tree.c:1284 rcu_check_quiescent_state kernel/rcu/tree.c:2070 [inline] rcu_core+0x143/0x1890 kernel/rcu/tree.c:2489 __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:__sanitizer_cov_trace_pc+0x37/0x60 kernel/kcov.c:200 Code: 81 e1 00 01 00 00 65 48 8b 14 25 80 6f 02 00 a9 00 01 ff 00 74 0e 85 c9 74 35 8b 82 bc 15 00 00 85 c0 74 2b 8b 82 98 15 00 00 <83> f8 02 75 20 48 8b 8a a0 15 00 00 8b 92 9c 15 00 00 48 8b 01 48 RSP: 0018:ffffc900040ff720 EFLAGS: 00000246 RAX: 0000000000000000 RBX: ffffc900040ffa38 RCX: 0000000000000000 RDX: ffff8880008dc140 RSI: ffffffff81b72120 RDI: 0000000000000007 RBP: ffffffffffffffff R08: 0000000000000007 R09: 0000000000000000 R10: ffffffffffffffff R11: 0000000000000000 R12: ffffea0001907008 R13: ffffea0001907000 R14: ffffea0001907000 R15: ffff8880654c10a0 __tlb_remove_page_size+0x50/0x420 mm/mmu_gather.c:89 __tlb_remove_page include/asm-generic/tlb.h:440 [inline] zap_pte_range mm/memory.c:1457 [inline] zap_pmd_range mm/memory.c:1575 [inline] zap_pud_range mm/memory.c:1604 [inline] zap_p4d_range mm/memory.c:1625 [inline] unmap_page_range+0x12c6/0x3cc0 mm/memory.c:1646 unmap_single_vma+0x196/0x360 mm/memory.c:1694 unmap_vmas+0x18c/0x310 mm/memory.c:1731 exit_mmap+0x1b8/0x490 mm/mmap.c:3116 __mmput+0x122/0x4b0 kernel/fork.c:1187 mmput+0x56/0x60 kernel/fork.c:1208 exit_mm kernel/exit.c:510 [inline] do_exit+0x9e2/0x29b0 kernel/exit.c:782 do_group_exit+0xd2/0x2f0 kernel/exit.c:925 get_signal+0x238c/0x2610 kernel/signal.c:2857 arch_do_signal_or_restart+0x82/0x2300 arch/x86/kernel/signal.c:869 exit_to_user_mode_loop kernel/entry/common.c:166 [inline] exit_to_user_mode_prepare+0x15f/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:0x7fc87c089279 Code: Unable to access opcode bytes at RIP 0x7fc87c08924f. RSP: 002b:00007fc87affe218 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca RAX: fffffffffffffe00 RBX: 00007fc87c19bf88 RCX: 00007fc87c089279 RDX: 0000000000000000 RSI: 0000000000000080 RDI: 00007fc87c19bf88 RBP: 00007fc87c19bf80 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00007fc87c19bf8c R13: 00007ffc312a582f R14: 00007fc87affe300 R15: 0000000000022000 ---------------- Code disassembly (best guess): 0: 74 24 je 0x26 2: 10 e8 adc %ch,%al 4: ca 2f dc lret $0xdc2f 7: f7 48 89 ef e8 52 b1 testl $0xb152e8ef,-0x77(%rax) e: dc f7 fdiv %st,%st(7) 10: 81 e3 00 02 00 00 and $0x200,%ebx 16: 75 25 jne 0x3d 18: 9c pushfq 19: 58 pop %rax 1a: f6 c4 02 test $0x2,%ah 1d: 75 2d jne 0x4c 1f: 48 85 db test %rbx,%rbx 22: 74 01 je 0x25 24: fb sti 25: bf 01 00 00 00 mov $0x1,%edi * 2a: e8 93 72 cf f7 callq 0xf7cf72c2 <-- trapping instruction 2f: 65 8b 05 bc fe 7f 76 mov %gs:0x767ffebc(%rip),%eax # 0x767ffef2 36: 85 c0 test %eax,%eax 38: 74 0a je 0x44 3a: 5b pop %rbx 3b: 5d pop %rbp 3c: c3 retq 3d: e8 .byte 0xe8 3e: 00 .byte 0x0 3f: 40 rex