================================ WARNING: inconsistent lock state 6.0.0-rc4-syzkaller-00284-gce888220d5c7 #0 Not tainted -------------------------------- inconsistent {HARDIRQ-ON-W} -> {IN-HARDIRQ-W} usage. syz-executor.1/4236 [HC1[1]:SC0[0]:HE0:SE1] takes: ffff8880261c5418 ( &clnt->lock){?.+.}-{2:2}, at: p9_tag_remove net/9p/client.c:367 [inline] &clnt->lock){?.+.}-{2:2}, at: p9_req_put net/9p/client.c:375 [inline] &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: 242 hardirqs last enabled at (241): [] seqcount_lockdep_reader_access include/linux/seqlock.h:104 [inline] hardirqs last enabled at (241): [] read_seqbegin include/linux/seqlock.h:836 [inline] hardirqs last enabled at (241): [] zone_span_seqbegin include/linux/memory_hotplug.h:141 [inline] hardirqs last enabled at (241): [] page_outside_zone_boundaries mm/page_alloc.c:644 [inline] hardirqs last enabled at (241): [] bad_range+0x25c/0x330 mm/page_alloc.c:671 hardirqs last disabled at (242): [] 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 *** 3 locks held by syz-executor.1/4236: #0: ffff888026202468 (&pipe->mutex /1){+.+.}-{3:3}, at: __pipe_lock fs/pipe.c:103 [inline] /1){+.+.}-{3:3}, at: pipe_write+0x132/0x1be0 fs/pipe.c:431 #1: ffffffff8bf86900 (rcu_read_lock){....}-{1:2}, at: memcg_kmem_bypass mm/memcontrol.c:983 [inline] #1: ffffffff8bf86900 (rcu_read_lock){....}-{1:2}, at: get_obj_cgroup_from_current mm/memcontrol.c:2957 [inline] #1: ffffffff8bf86900 (rcu_read_lock){....}-{1:2}, at: __memcg_kmem_charge_page+0xc0/0x3b0 mm/memcontrol.c:3064 #2: ffff8880458f0020 (&chan->lock#2){-...}-{2:2}, at: req_done+0xcf/0x2e0 net/9p/trans_virtio.c:139 stack backtrace: CPU: 0 PID: 4236 Comm: syz-executor.1 Not tainted 6.0.0-rc4-syzkaller-00284-gce888220d5c7 #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:lock_acquire+0x1ef/0x570 kernel/locking/lockdep.c:5634 Code: cf a3 7e 83 f8 01 0f 85 e8 02 00 00 9c 58 f6 c4 02 0f 85 fb 02 00 00 48 83 7c 24 08 00 74 01 fb 48 b8 00 00 00 00 00 fc ff df <48> 01 c3 48 c7 03 00 00 00 00 48 c7 43 08 00 00 00 00 48 8b 84 24 RSP: 0018:ffffc9000562f9a0 EFLAGS: 00000206 RAX: dffffc0000000000 RBX: 1ffff92000ac5f36 RCX: f2a53caa7dfe9fb9 RDX: 1ffff11005617556 RSI: 0000000000000000 RDI: 0000000000000000 RBP: 0000000000000000 R08: 0000000000000000 R09: ffffffff908df947 R10: fffffbfff211bf28 R11: 0000000000000001 R12: 0000000000000002 R13: 0000000000000000 R14: ffffffff8bf86900 R15: 0000000000000000 rcu_lock_acquire include/linux/rcupdate.h:280 [inline] rcu_read_lock include/linux/rcupdate.h:706 [inline] get_obj_cgroup_from_current mm/memcontrol.c:2960 [inline] __memcg_kmem_charge_page+0xe5/0x3b0 mm/memcontrol.c:3064 __alloc_pages+0x1ef/0x510 mm/page_alloc.c:5532 alloc_pages+0x1a6/0x270 mm/mempolicy.c:2270 pipe_write+0xd50/0x1be0 fs/pipe.c:496 call_write_iter include/linux/fs.h:2187 [inline] new_sync_write fs/read_write.c:491 [inline] vfs_write+0x9e9/0xdd0 fs/read_write.c:578 ksys_write+0x1e8/0x250 fs/read_write.c:631 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:0x7fd96f2893c9 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:00007fd9704b3168 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 00007fd96f39bf80 RCX: 00007fd96f2893c9 RDX: 0000000000000015 RSI: 0000000020000080 RDI: 0000000000000004 RBP: 00007fd96f2e433f R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffd31ad7cff R14: 00007fd9704b3300 R15: 0000000000022000 ---------------- Code disassembly (best guess): 0: cf iret 1: a3 7e 83 f8 01 0f 85 movabs %eax,0x2e8850f01f8837e 8: e8 02 a: 00 00 add %al,(%rax) c: 9c pushfq d: 58 pop %rax e: f6 c4 02 test $0x2,%ah 11: 0f 85 fb 02 00 00 jne 0x312 17: 48 83 7c 24 08 00 cmpq $0x0,0x8(%rsp) 1d: 74 01 je 0x20 1f: fb sti 20: 48 b8 00 00 00 00 00 movabs $0xdffffc0000000000,%rax 27: fc ff df * 2a: 48 01 c3 add %rax,%rbx <-- trapping instruction 2d: 48 c7 03 00 00 00 00 movq $0x0,(%rbx) 34: 48 c7 43 08 00 00 00 movq $0x0,0x8(%rbx) 3b: 00 3c: 48 rex.W 3d: 8b .byte 0x8b 3e: 84 .byte 0x84 3f: 24 .byte 0x24