================================ WARNING: inconsistent lock state 6.0.0-rc6-syzkaller-00030-g06f7db949993 #0 Not tainted -------------------------------- inconsistent {HARDIRQ-ON-W} -> {IN-HARDIRQ-W} usage. syz-executor.1/6973 [HC1[1]:SC1[1]:HE0:SE0] takes: ffff88801be4e418 (&clnt->lock){?.+.}-{2:2}, at: p9_tag_remove net/9p/client.c:367 [inline] ffff88801be4e418 (&clnt->lock){?.+.}-{2:2}, at: p9_req_put net/9p/client.c:375 [inline] ffff88801be4e418 (&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] __ia32_sys_mount+0x27e/0x300 fs/namespace.c:3568 do_syscall_32_irqs_on arch/x86/entry/common.c:112 [inline] __do_fast_syscall_32+0x65/0xf0 arch/x86/entry/common.c:178 do_fast_syscall_32+0x2f/0x70 arch/x86/entry/common.c:203 entry_SYSENTER_compat_after_hwframe+0x70/0x82 irq event stamp: 321 hardirqs last enabled at (320): [] __raw_spin_unlock_irqrestore include/linux/spinlock_api_smp.h:151 [inline] hardirqs last enabled at (320): [] _raw_spin_unlock_irqrestore+0x50/0x70 kernel/locking/spinlock.c:194 hardirqs last disabled at (321): [] common_interrupt+0x11/0xc0 arch/x86/kernel/irq.c:240 softirqs last enabled at (0): [] copy_process+0x212f/0x7090 kernel/fork.c:2199 softirqs last disabled at (55): [] invoke_softirq kernel/softirq.c:445 [inline] softirqs last disabled at (55): [] __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.1/6973: #0: ffffffff8bf89400 (rcu_read_lock){....}-{1:2}, at: percpu_ref_put_many.constprop.0+0x0/0x1a0 mm/memcontrol.c:5300 #1: ffffffff8bf892e0 (rcu_callback){....}-{0:0}, at: rcu_do_batch kernel/rcu/tree.c:2234 [inline] #1: ffffffff8bf892e0 (rcu_callback){....}-{0:0}, at: rcu_core+0x741/0x1890 kernel/rcu/tree.c:2505 #2: ffff88804037c020 (&chan->lock#2){-.-.}-{2:2}, at: req_done+0xcf/0x2e0 net/9p/trans_virtio.c:139 stack backtrace: CPU: 1 PID: 6973 Comm: syz-executor.1 Not tainted 6.0.0-rc6-syzkaller-00030-g06f7db949993 #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:deref_stack_reg arch/x86/kernel/unwind_orc.c:360 [inline] RIP: 0010:unwind_next_frame+0x12e4/0x1cc0 arch/x86/kernel/unwind_orc.c:605 Code: 0f 84 d7 f0 ff ff 4c 89 f7 e8 88 e6 ff ff 49 8d 7d 40 48 89 fa 48 89 c5 48 b8 00 00 00 00 00 fc ff df 48 c1 ea 03 80 3c 02 00 <0f> 84 86 fc ff ff e8 61 6a 92 00 e9 7c fc ff ff 49 8d 6d 40 48 b8 RSP: 0018:ffffc900005289b0 EFLAGS: 00000246 RAX: dffffc0000000000 RBX: 0000000000000002 RCX: 0000000000000002 RDX: 1ffff920000a514c RSI: ffffc90000528dc8 RDI: ffffc90000528a60 RBP: ffff8880119f6c80 R08: ffffffff8e695b88 R09: ffffc90000528a54 R10: fffff520000a514f R11: ffffc90000528df0 R12: ffffc90000528a55 R13: ffffc90000528a20 R14: ffffc90000528dc8 R15: ffffffff8e695b8c arch_stack_walk+0x7d/0xe0 arch/x86/kernel/stacktrace.c:25 stack_trace_save+0x8c/0xc0 kernel/stacktrace.c:122 kasan_save_stack+0x1e/0x40 mm/kasan/common.c:38 kasan_set_track+0x21/0x30 mm/kasan/common.c:45 kasan_set_free_info+0x20/0x30 mm/kasan/generic.c:370 ____kasan_slab_free mm/kasan/common.c:367 [inline] ____kasan_slab_free+0x166/0x1c0 mm/kasan/common.c:329 kasan_slab_free include/linux/kasan.h:200 [inline] slab_free_hook mm/slub.c:1754 [inline] slab_free_freelist_hook+0x8b/0x1c0 mm/slub.c:1780 slab_free mm/slub.c:3534 [inline] kmem_cache_free+0xeb/0x5b0 mm/slub.c:3551 rcu_do_batch kernel/rcu/tree.c:2245 [inline] rcu_core+0x7b5/0x1890 kernel/rcu/tree.c:2505 __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:lock_acquire+0x1ef/0x570 kernel/locking/lockdep.c:5634 Code: f9 a2 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:ffffc90029defb78 EFLAGS: 00000206 RAX: dffffc0000000000 RBX: 1ffff920053bdf71 RCX: e460fc627dc0ad1e RDX: 1ffff11002a9b4fe RSI: 0000000000000000 RDI: 0000000000000000 RBP: 0000000000000000 R08: 0000000000000000 R09: ffffffff908e5947 R10: fffffbfff211cb28 R11: 0000000000000000 R12: 0000000000000002 R13: 0000000000000000 R14: ffffffff8bf89400 R15: 0000000000000000 rcu_lock_acquire include/linux/rcupdate.h:280 [inline] rcu_read_lock include/linux/rcupdate.h:706 [inline] percpu_ref_put_many.constprop.0+0x2c/0x1a0 include/linux/percpu-refcount.h:330 percpu_ref_put include/linux/percpu-refcount.h:351 [inline] css_put include/linux/cgroup.h:404 [inline] obj_cgroup_charge_pages mm/memcontrol.c:3046 [inline] obj_cgroup_charge+0x35d/0x5e0 mm/memcontrol.c:3330 memcg_slab_pre_alloc_hook mm/slab.h:496 [inline] slab_pre_alloc_hook mm/slab.h:705 [inline] slab_alloc_node mm/slub.c:3157 [inline] slab_alloc mm/slub.c:3251 [inline] __kmem_cache_alloc_lru mm/slub.c:3258 [inline] kmem_cache_alloc+0x96/0x3b0 mm/slub.c:3268 sk_prot_alloc+0x5f/0x290 net/core/sock.c:1970 sk_alloc+0x36/0x770 net/core/sock.c:2029 inet6_create net/ipv6/af_inet6.c:185 [inline] inet6_create+0x36f/0x1030 net/ipv6/af_inet6.c:112 __sock_create+0x355/0x790 net/socket.c:1515 sock_create net/socket.c:1566 [inline] __sys_socket_create net/socket.c:1603 [inline] __sys_socket_create net/socket.c:1588 [inline] __sys_socket+0x12f/0x240 net/socket.c:1636 __do_sys_socket net/socket.c:1649 [inline] __se_sys_socket net/socket.c:1647 [inline] __ia32_sys_socket+0x6f/0xb0 net/socket.c:1647 do_syscall_32_irqs_on arch/x86/entry/common.c:112 [inline] __do_fast_syscall_32+0x65/0xf0 arch/x86/entry/common.c:178 do_fast_syscall_32+0x2f/0x70 arch/x86/entry/common.c:203 entry_SYSENTER_compat_after_hwframe+0x70/0x82 RIP: 0023:0xf7f8f549 Code: 03 74 c0 01 10 05 03 74 b8 01 10 06 03 74 b4 01 10 07 03 74 b0 01 10 08 03 74 d8 01 00 00 00 00 00 51 52 55 89 e5 0f 34 cd 80 <5d> 5a 59 c3 90 90 90 90 8d b4 26 00 00 00 00 8d b4 26 00 00 00 00 RSP: 002b:00000000f7f8a5cc EFLAGS: 00000296 ORIG_RAX: 0000000000000167 RAX: ffffffffffffffda RBX: 000000000000000a RCX: 0000000000000001 RDX: 0000000000000106 RSI: 0000000000000000 RDI: 0000000000000000 RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 ---------------- Code disassembly (best guess): 0: 0f 84 d7 f0 ff ff je 0xfffff0dd 6: 4c 89 f7 mov %r14,%rdi 9: e8 88 e6 ff ff callq 0xffffe696 e: 49 8d 7d 40 lea 0x40(%r13),%rdi 12: 48 89 fa mov %rdi,%rdx 15: 48 89 c5 mov %rax,%rbp 18: 48 b8 00 00 00 00 00 movabs $0xdffffc0000000000,%rax 1f: fc ff df 22: 48 c1 ea 03 shr $0x3,%rdx 26: 80 3c 02 00 cmpb $0x0,(%rdx,%rax,1) * 2a: 0f 84 86 fc ff ff je 0xfffffcb6 <-- trapping instruction 30: e8 61 6a 92 00 callq 0x926a96 35: e9 7c fc ff ff jmpq 0xfffffcb6 3a: 49 8d 6d 40 lea 0x40(%r13),%rbp 3e: 48 rex.W 3f: b8 .byte 0xb8