================================ WARNING: inconsistent lock state 6.4.0-rc7-syzkaller-00226-ga92b7d26c743 #0 Not tainted -------------------------------- inconsistent {SOFTIRQ-ON-W} -> {IN-SOFTIRQ-W} usage. syz-executor.3/3117 [HC0[0]:SC1[1]:HE0:SE0] takes: ffff88807ffdc728 (&pgdat->memcg_lru.lock){+.?.}-{2:2}, at: spin_lock include/linux/spinlock.h:350 [inline] ffff88807ffdc728 (&pgdat->memcg_lru.lock){+.?.}-{2:2}, at: lru_gen_rotate_memcg+0x64/0xab0 mm/vmscan.c:4734 {SOFTIRQ-ON-W} state was registered at: lock_acquire kernel/locking/lockdep.c:5705 [inline] lock_acquire+0x1b1/0x520 kernel/locking/lockdep.c:5670 __raw_spin_lock include/linux/spinlock_api_smp.h:133 [inline] _raw_spin_lock+0x2e/0x40 kernel/locking/spinlock.c:154 spin_lock include/linux/spinlock.h:350 [inline] lru_gen_online_memcg+0x16b/0x5a0 mm/vmscan.c:4782 mem_cgroup_css_online+0x227/0x3b0 mm/memcontrol.c:5468 online_css+0xaf/0x2a0 kernel/cgroup/cgroup.c:5505 cgroup_init_subsys+0x46b/0x900 kernel/cgroup/cgroup.c:6036 cgroup_init+0xb83/0x1090 kernel/cgroup/cgroup.c:6120 start_kernel+0x398/0x490 init/main.c:1077 x86_64_start_reservations+0x18/0x30 arch/x86/kernel/head64.c:556 x86_64_start_kernel+0xb3/0xc0 arch/x86/kernel/head64.c:537 secondary_startup_64_no_verify+0xf4/0xfb irq event stamp: 29077 hardirqs last enabled at (29076): [] mod_memcg_state include/linux/memcontrol.h:982 [inline] hardirqs last enabled at (29076): [] memcg_account_kmem+0x4f/0x80 mm/memcontrol.c:3094 hardirqs last disabled at (29077): [] uncharge_batch+0x1c7/0x560 mm/memcontrol.c:7142 softirqs last enabled at (28582): [] napi_free_frags include/linux/netdevice.h:3913 [inline] softirqs last enabled at (28582): [] napi_get_frags_check+0x6d/0xb0 net/core/skbuff.c:297 softirqs last disabled at (29013): [] invoke_softirq kernel/softirq.c:445 [inline] softirqs last disabled at (29013): [] __irq_exit_rcu+0x114/0x190 kernel/softirq.c:650 other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(&pgdat->memcg_lru.lock); lock(&pgdat->memcg_lru.lock); *** DEADLOCK *** 4 locks held by syz-executor.3/3117: #0: ffffffff8e0f8490 (pernet_ops_rwsem){++++}-{3:3}, at: copy_net_ns+0x4cb/0x8e0 net/core/net_namespace.c:487 #1: ffffffff8e10bbe8 (rtnl_mutex){+.+.}-{3:3}, at: register_netdev+0x15/0x50 net/core/dev.c:10213 #2: ffffffff8c8e9a80 (fs_reclaim){+.+.}-{0:0}, at: might_alloc include/linux/sched/mm.h:303 [inline] #2: ffffffff8c8e9a80 (fs_reclaim){+.+.}-{0:0}, at: slab_pre_alloc_hook mm/slab.h:670 [inline] #2: ffffffff8c8e9a80 (fs_reclaim){+.+.}-{0:0}, at: slab_alloc_node mm/slab.c:3240 [inline] #2: ffffffff8c8e9a80 (fs_reclaim){+.+.}-{0:0}, at: __kmem_cache_alloc_node+0x3b/0x3f0 mm/slab.c:3540 #3: ffffffff8c796020 (rcu_callback){....}-{0:0}, at: rcu_do_batch kernel/rcu/tree.c:2104 [inline] #3: ffffffff8c796020 (rcu_callback){....}-{0:0}, at: rcu_core+0x791/0x1ad0 kernel/rcu/tree.c:2377 stack backtrace: CPU: 3 PID: 3117 Comm: syz-executor.3 Not tainted 6.4.0-rc7-syzkaller-00226-ga92b7d26c743 #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+0xd9/0x150 lib/dump_stack.c:106 print_usage_bug kernel/locking/lockdep.c:3949 [inline] valid_state kernel/locking/lockdep.c:3991 [inline] mark_lock_irq kernel/locking/lockdep.c:4194 [inline] mark_lock.part.0+0x1110/0x1970 kernel/locking/lockdep.c:4656 mark_lock kernel/locking/lockdep.c:4620 [inline] mark_usage kernel/locking/lockdep.c:4545 [inline] __lock_acquire+0x1227/0x5f30 kernel/locking/lockdep.c:5042 lock_acquire kernel/locking/lockdep.c:5705 [inline] lock_acquire+0x1b1/0x520 kernel/locking/lockdep.c:5670 __raw_spin_lock include/linux/spinlock_api_smp.h:133 [inline] _raw_spin_lock+0x2e/0x40 kernel/locking/spinlock.c:154 spin_lock include/linux/spinlock.h:350 [inline] lru_gen_rotate_memcg+0x64/0xab0 mm/vmscan.c:4734 lru_gen_soft_reclaim+0x62/0x70 mm/vmscan.c:4837 uncharge_batch+0x2be/0x560 mm/memcontrol.c:7145 __mem_cgroup_uncharge+0x11f/0x290 mm/memcontrol.c:7221 mem_cgroup_uncharge include/linux/memcontrol.h:698 [inline] __folio_put_small mm/swap.c:105 [inline] __folio_put+0xb6/0x140 mm/swap.c:129 folio_put include/linux/mm.h:1430 [inline] put_page include/linux/mm.h:1499 [inline] free_page_and_swap_cache+0x257/0x2c0 mm/swap_state.c:305 __tlb_remove_table arch/x86/include/asm/tlb.h:34 [inline] __tlb_remove_table_free mm/mmu_gather.c:153 [inline] tlb_remove_table_rcu+0x89/0xe0 mm/mmu_gather.c:208 rcu_do_batch kernel/rcu/tree.c:2115 [inline] rcu_core+0x806/0x1ad0 kernel/rcu/tree.c:2377 __do_softirq+0x1d4/0x905 kernel/softirq.c:571 invoke_softirq kernel/softirq.c:445 [inline] __irq_exit_rcu+0x114/0x190 kernel/softirq.c:650 irq_exit_rcu+0x9/0x20 kernel/softirq.c:662 sysvec_apic_timer_interrupt+0x97/0xc0 arch/x86/kernel/apic/apic.c:1106 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:645 RIP: 0010:lock_release+0x3f4/0x670 kernel/locking/lockdep.c:5713 Code: 7e 83 f8 01 0f 85 40 01 00 00 9c 58 f6 c4 02 0f 85 2b 01 00 00 48 f7 04 24 00 02 00 00 74 01 fb 48 b8 00 00 00 00 00 fc ff df <48> 01 c5 48 c7 45 00 00 00 00 00 c7 45 08 00 00 00 00 48 8b 84 24 RSP: 0018:ffffc90022d27600 EFLAGS: 00000206 RAX: dffffc0000000000 RBX: 1ecd0110d7f65e9a RCX: ffffc90022d27650 RDX: 1ffff11007091b3f RSI: 0000000000000000 RDI: 0000000000000000 RBP: 1ffff920045a4ec2 R08: 0000000000000001 R09: ffffffff8e79d317 R10: fffffbfff1cf3a62 R11: 0000000000094001 R12: 0000000000000003 R13: ffff88803848da00 R14: 0000000000000004 R15: ffff88803848cf40 might_alloc include/linux/sched/mm.h:303 [inline] slab_pre_alloc_hook mm/slab.h:670 [inline] slab_alloc_node mm/slab.c:3240 [inline] __kmem_cache_alloc_node+0x3b/0x3f0 mm/slab.c:3540 kmalloc_trace+0x26/0xe0 mm/slab_common.c:1057 kmalloc include/linux/slab.h:559 [inline] kzalloc include/linux/slab.h:680 [inline] kobject_uevent_env+0x232/0x16c0 lib/kobject_uevent.c:524 rx_queue_add_kobject net/core/net-sysfs.c:1102 [inline] net_rx_queue_update_kobjects+0x1b0/0x640 net/core/net-sysfs.c:1142 register_queue_kobjects net/core/net-sysfs.c:1802 [inline] netdev_register_kobject+0x279/0x400 net/core/net-sysfs.c:2047 register_netdevice+0xd77/0x1640 net/core/dev.c:10087 register_netdev+0x31/0x50 net/core/dev.c:10215 ip6_tnl_init_net+0x2a4/0x450 net/ipv6/ip6_tunnel.c:2255 ops_init+0xb9/0x6b0 net/core/net_namespace.c:136 setup_net+0x5d1/0xc50 net/core/net_namespace.c:339 copy_net_ns+0x4ee/0x8e0 net/core/net_namespace.c:491 create_new_namespaces+0x3f6/0xb20 kernel/nsproxy.c:110 copy_namespaces+0x410/0x500 kernel/nsproxy.c:179 copy_process+0x322c/0x75c0 kernel/fork.c:2510 kernel_clone+0xeb/0x890 kernel/fork.c:2915 __do_sys_clone+0xba/0x100 kernel/fork.c:3058 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x39/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7f039a48c389 Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 f1 19 00 00 90 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:00007f039b123118 EFLAGS: 00000206 ORIG_RAX: 0000000000000038 RAX: ffffffffffffffda RBX: 00007f039a5abf80 RCX: 00007f039a48c389 RDX: 00000000200026c0 RSI: 00000000200026c0 RDI: 0000000040300400 RBP: 00007f039a4d7493 R08: 0000000020002740 R09: 0000000020002740 R10: 0000000020002700 R11: 0000000000000206 R12: 0000000000000000 R13: 00007ffe1f83492f R14: 00007f039b123300 R15: 0000000000022000 ---------------- Code disassembly (best guess): 0: 7e 83 jle 0xffffff85 2: f8 clc 3: 01 0f add %ecx,(%rdi) 5: 85 40 01 test %eax,0x1(%rax) 8: 00 00 add %al,(%rax) a: 9c pushfq b: 58 pop %rax c: f6 c4 02 test $0x2,%ah f: 0f 85 2b 01 00 00 jne 0x140 15: 48 f7 04 24 00 02 00 testq $0x200,(%rsp) 1c: 00 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 c5 add %rax,%rbp <-- trapping instruction 2d: 48 c7 45 00 00 00 00 movq $0x0,0x0(%rbp) 34: 00 35: c7 45 08 00 00 00 00 movl $0x0,0x8(%rbp) 3c: 48 rex.W 3d: 8b .byte 0x8b 3e: 84 .byte 0x84 3f: 24 .byte 0x24