================================ WARNING: inconsistent lock state 6.4.0-rc6-syzkaller-00037-gb6dad5178cea #0 Not tainted -------------------------------- inconsistent {SOFTIRQ-ON-W} -> {IN-SOFTIRQ-W} usage. syz-executor.2/1117 [HC0[0]:SC1[1]:HE0:SE0] takes: ffff88817fffc728 (&pgdat->memcg_lru.lock){+.?.}-{2:2}, at: spin_lock include/linux/spinlock.h:350 [inline] ffff88817fffc728 (&pgdat->memcg_lru.lock){+.?.}-{2:2}, at: lru_gen_rotate_memcg+0x64/0xab0 mm/vmscan.c:4749 {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:4797 mem_cgroup_css_online+0x227/0x3b0 mm/memcontrol.c:5468 online_css+0xaf/0x2a0 kernel/cgroup/cgroup.c:5491 cgroup_init_subsys+0x46b/0x900 kernel/cgroup/cgroup.c:6022 cgroup_init+0xb83/0x1090 kernel/cgroup/cgroup.c:6106 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: 2013 hardirqs last enabled at (2012): [] mod_memcg_state include/linux/memcontrol.h:982 [inline] hardirqs last enabled at (2012): [] memcg_account_kmem+0x4f/0x80 mm/memcontrol.c:3094 hardirqs last disabled at (2013): [] uncharge_batch+0x1c7/0x560 mm/memcontrol.c:7142 softirqs last enabled at (1796): [] neigh_parms_alloc+0x41b/0x5f0 net/core/neighbour.c:1725 softirqs last disabled at (1809): [] invoke_softirq kernel/softirq.c:445 [inline] softirqs last disabled at (1809): [] __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.2/1117: #0: ffffffff8e10b468 (rtnl_mutex){+.+.}-{3:3}, at: rtnl_lock net/core/rtnetlink.c:78 [inline] #0: ffffffff8e10b468 (rtnl_mutex){+.+.}-{3:3}, at: rtnetlink_rcv_msg+0x3e8/0xd50 net/core/rtnetlink.c:6414 #1: ffffffff8c8e9ba0 (fs_reclaim){+.+.}-{0:0}, at: might_alloc include/linux/sched/mm.h:303 [inline] #1: ffffffff8c8e9ba0 (fs_reclaim){+.+.}-{0:0}, at: slab_pre_alloc_hook mm/slab.h:670 [inline] #1: ffffffff8c8e9ba0 (fs_reclaim){+.+.}-{0:0}, at: slab_alloc_node mm/slab.c:3240 [inline] #1: ffffffff8c8e9ba0 (fs_reclaim){+.+.}-{0:0}, at: __kmem_cache_alloc_node+0x3b/0x3f0 mm/slab.c:3540 #2: ffffffff8c909fc0 (mmu_notifier_invalidate_range_start){+.+.}-{0:0}, at: fs_reclaim_acquire+0xb6/0x160 mm/page_alloc.c:3906 #3: ffffffff8c795fe0 (rcu_callback){....}-{0:0}, at: rcu_do_batch kernel/rcu/tree.c:2104 [inline] #3: ffffffff8c795fe0 (rcu_callback){....}-{0:0}, at: rcu_core+0x791/0x1ad0 kernel/rcu/tree.c:2377 stack backtrace: CPU: 3 PID: 1117 Comm: syz-executor.2 Not tainted 6.4.0-rc6-syzkaller-00037-gb6dad5178cea #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:4749 lru_gen_soft_reclaim+0x62/0x70 mm/vmscan.c:4852 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_acquire+0x1f5/0x520 kernel/locking/lockdep.c:5673 Code: 76 9d 7e 83 f8 01 0f 85 b9 02 00 00 9c 58 f6 c4 02 0f 85 a4 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:ffffc90027eced60 EFLAGS: 00000206 RAX: dffffc0000000000 RBX: 1ffff92004fd9dae RCX: 0000000000011f1f RDX: 1ffff11026a073e8 RSI: 0000000000000000 RDI: 0000000000000000 RBP: 0000000000000001 R08: 0000000000000000 R09: ffffffff9151ed17 R10: fffffbfff22a3da2 R11: 0000000000094001 R12: 0000000000000000 R13: 0000000000000000 R14: ffffffff8c909fc0 R15: 0000000000000000 fs_reclaim_acquire mm/page_alloc.c:3910 [inline] fs_reclaim_acquire+0xda/0x160 mm/page_alloc.c:3901 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] snmp6_alloc_dev net/ipv6/addrconf.c:349 [inline] ipv6_add_dev+0x528/0x13b0 net/ipv6/addrconf.c:403 addrconf_notify+0x63d/0x19f0 net/ipv6/addrconf.c:3552 notifier_call_chain+0xb6/0x3c0 kernel/notifier.c:93 call_netdevice_notifiers_info+0xb9/0x130 net/core/dev.c:1935 call_netdevice_notifiers_extack net/core/dev.c:1973 [inline] call_netdevice_notifiers net/core/dev.c:1987 [inline] register_netdevice+0xfb4/0x1640 net/core/dev.c:10120 veth_newlink+0x352/0x9d0 drivers/net/veth.c:1897 rtnl_newlink_create net/core/rtnetlink.c:3465 [inline] __rtnl_newlink+0x10c2/0x1840 net/core/rtnetlink.c:3682 rtnl_newlink+0x68/0xa0 net/core/rtnetlink.c:3695 rtnetlink_rcv_msg+0x43d/0xd50 net/core/rtnetlink.c:6417 netlink_rcv_skb+0x165/0x440 net/netlink/af_netlink.c:2546 netlink_unicast_kernel net/netlink/af_netlink.c:1339 [inline] netlink_unicast+0x547/0x7f0 net/netlink/af_netlink.c:1365 netlink_sendmsg+0x925/0xe30 net/netlink/af_netlink.c:1913 sock_sendmsg_nosec net/socket.c:724 [inline] sock_sendmsg+0xde/0x190 net/socket.c:747 ____sys_sendmsg+0x71c/0x900 net/socket.c:2503 ___sys_sendmsg+0x110/0x1b0 net/socket.c:2557 __sys_sendmsg+0xf7/0x1c0 net/socket.c:2586 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:0x7f4d9bc8c149 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:00007f4d9a7fe168 EFLAGS: 00000246 ORIG_RAX: 000000000000002e RAX: ffffffffffffffda RBX: 00007f4d9bdabf80 RCX: 00007f4d9bc8c149 RDX: 0000000000000000 RSI: 0000000020000040 RDI: 0000000000000005 RBP: 00007f4d9bce7cd2 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007fff8c9b59bf R14: 00007f4d9a7fe300 R15: 0000000000022000 ---------------- Code disassembly (best guess): 0: 76 9d jbe 0xffffff9f 2: 7e 83 jle 0xffffff87 4: f8 clc 5: 01 0f add %ecx,(%rdi) 7: 85 b9 02 00 00 9c test %edi,-0x63fffffe(%rcx) d: 58 pop %rax e: f6 c4 02 test $0x2,%ah 11: 0f 85 a4 02 00 00 jne 0x2bb 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