NOHZ tick-stop error: local softirq work is pending, handler #200!!! ================================================================== BUG: KASAN: slab-use-after-free in rb_sched_core_cmp kernel/sched/core.c:259 [inline] BUG: KASAN: slab-use-after-free in rb_find_first include/linux/rbtree.h:291 [inline] BUG: KASAN: slab-use-after-free in sched_core_find kernel/sched/core.c:333 [inline] BUG: KASAN: slab-use-after-free in try_steal_cookie kernel/sched/core.c:6284 [inline] BUG: KASAN: slab-use-after-free in steal_cookie_task kernel/sched/core.c:6333 [inline] BUG: KASAN: slab-use-after-free in sched_core_balance+0x5e4/0x1180 kernel/sched/core.c:6353 Read of size 8 at addr ffff888079eddcd8 by task swapper/0/0 CPU: 0 UID: 0 PID: 0 Comm: swapper/0 Not tainted 6.11.0-rc5-next-20240827-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/06/2024 Call Trace: __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0x241/0x360 lib/dump_stack.c:120 print_address_description mm/kasan/report.c:377 [inline] print_report+0x169/0x550 mm/kasan/report.c:488 kasan_report+0x143/0x180 mm/kasan/report.c:601 rb_sched_core_cmp kernel/sched/core.c:259 [inline] rb_find_first include/linux/rbtree.h:291 [inline] sched_core_find kernel/sched/core.c:333 [inline] try_steal_cookie kernel/sched/core.c:6284 [inline] steal_cookie_task kernel/sched/core.c:6333 [inline] sched_core_balance+0x5e4/0x1180 kernel/sched/core.c:6353 do_balance_callbacks kernel/sched/core.c:4963 [inline] __balance_callbacks+0x188/0x280 kernel/sched/core.c:5017 finish_lock_switch kernel/sched/core.c:5064 [inline] finish_task_switch+0x1d3/0x870 kernel/sched/core.c:5183 context_switch kernel/sched/core.c:5314 [inline] __schedule+0x1852/0x4b30 kernel/sched/core.c:6677 schedule_idle+0x53/0x90 kernel/sched/core.c:6795 do_idle+0x56a/0x5d0 kernel/sched/idle.c:354 cpu_startup_entry+0x42/0x60 kernel/sched/idle.c:424 rest_init+0x2dc/0x300 init/main.c:747 start_kernel+0x47f/0x500 init/main.c:1105 x86_64_start_reservations+0x2a/0x30 arch/x86/kernel/head64.c:507 x86_64_start_kernel+0x9f/0xa0 arch/x86/kernel/head64.c:488 common_startup_64+0x13e/0x147 Allocated by task 5593: kasan_save_stack mm/kasan/common.c:47 [inline] kasan_save_track+0x3f/0x80 mm/kasan/common.c:68 unpoison_slab_object mm/kasan/common.c:319 [inline] __kasan_slab_alloc+0x66/0x80 mm/kasan/common.c:345 kasan_slab_alloc include/linux/kasan.h:250 [inline] slab_post_alloc_hook mm/slub.c:4040 [inline] slab_alloc_node mm/slub.c:4089 [inline] kmem_cache_alloc_node_noprof+0x16b/0x320 mm/slub.c:4132 alloc_task_struct_node kernel/fork.c:180 [inline] dup_task_struct+0x57/0x8c0 kernel/fork.c:1107 copy_process+0x5d1/0x3d50 kernel/fork.c:2203 kernel_clone+0x226/0x8f0 kernel/fork.c:2784 __do_sys_clone3 kernel/fork.c:3088 [inline] __se_sys_clone3+0x2cb/0x350 kernel/fork.c:3067 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f Freed by task 5593: kasan_save_stack mm/kasan/common.c:47 [inline] kasan_save_track+0x3f/0x80 mm/kasan/common.c:68 kasan_save_free_info+0x40/0x50 mm/kasan/generic.c:579 poison_slab_object mm/kasan/common.c:247 [inline] __kasan_slab_free+0x59/0x70 mm/kasan/common.c:264 kasan_slab_free include/linux/kasan.h:233 [inline] slab_free_hook mm/slub.c:2299 [inline] slab_free mm/slub.c:4525 [inline] kmem_cache_free+0x194/0x3d0 mm/slub.c:4627 put_task_struct include/linux/sched/task.h:139 [inline] delayed_put_task_struct+0x125/0x300 kernel/exit.c:228 rcu_do_batch kernel/rcu/tree.c:2567 [inline] rcu_core+0xaaa/0x17a0 kernel/rcu/tree.c:2823 handle_softirqs+0x2c5/0x980 kernel/softirq.c:554 __do_softirq kernel/softirq.c:588 [inline] invoke_softirq kernel/softirq.c:428 [inline] __irq_exit_rcu+0xf4/0x1c0 kernel/softirq.c:637 irq_exit_rcu+0x9/0x30 kernel/softirq.c:649 instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1037 [inline] sysvec_apic_timer_interrupt+0xa6/0xc0 arch/x86/kernel/apic/apic.c:1037 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:702 Last potentially related work creation: kasan_save_stack+0x3f/0x60 mm/kasan/common.c:47 __kasan_record_aux_stack+0xac/0xc0 mm/kasan/generic.c:541 __call_rcu_common kernel/rcu/tree.c:3086 [inline] call_rcu+0x167/0xa70 kernel/rcu/tree.c:3190 context_switch kernel/sched/core.c:5314 [inline] __schedule+0x1852/0x4b30 kernel/sched/core.c:6677 __schedule_loop kernel/sched/core.c:6754 [inline] schedule+0x14b/0x320 kernel/sched/core.c:6769 do_nanosleep+0x197/0x600 kernel/time/hrtimer.c:2032 hrtimer_nanosleep+0x1e3/0x3f0 kernel/time/hrtimer.c:2080 __do_sys_clock_nanosleep kernel/time/posix-timers.c:1411 [inline] __se_sys_clock_nanosleep+0x32b/0x3c0 kernel/time/posix-timers.c:1388 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f The buggy address belongs to the object at ffff888079edda00 which belongs to the cache task_struct of size 7424 The buggy address is located 728 bytes inside of freed 7424-byte region [ffff888079edda00, ffff888079edf700) The buggy address belongs to the physical page: page: refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff888079ed8000 pfn:0x79ed8 head: order:3 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0 memcg:ffff88802b2e2081 flags: 0xfff00000000040(head|node=0|zone=1|lastcpupid=0x7ff) page_type: f5(slab) raw: 00fff00000000040 ffff8880166f8500 ffffea00007d6c00 0000000000000002 raw: ffff888079ed8000 0000000080040003 00000001f5000000 ffff88802b2e2081 head: 00fff00000000040 ffff8880166f8500 ffffea00007d6c00 0000000000000002 head: ffff888079ed8000 0000000080040003 00000001f5000000 ffff88802b2e2081 head: 00fff00000000003 ffffea0001e7b601 ffffffffffffffff 0000000000000000 head: ffff888000000008 0000000000000000 00000000ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 3, migratetype Unmovable, gfp_mask 0xd20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 5198, tgid 5198 (dhcpcd-run-hook), ts 42508395792, free_ts 42507992366 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x1f3/0x230 mm/page_alloc.c:1520 prep_new_page mm/page_alloc.c:1528 [inline] get_page_from_freelist+0x312a/0x3270 mm/page_alloc.c:3479 __alloc_pages_noprof+0x29e/0x780 mm/page_alloc.c:4751 alloc_pages_mpol_noprof+0x3e8/0x680 mm/mempolicy.c:2265 alloc_slab_page+0x6a/0x120 mm/slub.c:2369 allocate_slab+0x5a/0x2f0 mm/slub.c:2535 new_slab mm/slub.c:2588 [inline] ___slab_alloc+0xcd1/0x14b0 mm/slub.c:3775 __slab_alloc+0x58/0xa0 mm/slub.c:3865 __slab_alloc_node mm/slub.c:3918 [inline] slab_alloc_node mm/slub.c:4077 [inline] kmem_cache_alloc_node_noprof+0x1fe/0x320 mm/slub.c:4132 alloc_task_struct_node kernel/fork.c:180 [inline] dup_task_struct+0x57/0x8c0 kernel/fork.c:1107 copy_process+0x5d1/0x3d50 kernel/fork.c:2203 kernel_clone+0x226/0x8f0 kernel/fork.c:2784 __do_sys_clone kernel/fork.c:2927 [inline] __se_sys_clone kernel/fork.c:2911 [inline] __x64_sys_clone+0x258/0x2a0 kernel/fork.c:2911 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f page last free pid 5198 tgid 5198 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1101 [inline] free_unref_page+0xc64/0xe80 mm/page_alloc.c:2654 __slab_free+0x31b/0x3d0 mm/slub.c:4436 qlink_free mm/kasan/quarantine.c:163 [inline] qlist_free_all+0x9a/0x140 mm/kasan/quarantine.c:179 kasan_quarantine_reduce+0x14f/0x170 mm/kasan/quarantine.c:286 __kasan_slab_alloc+0x23/0x80 mm/kasan/common.c:329 kasan_slab_alloc include/linux/kasan.h:250 [inline] slab_post_alloc_hook mm/slub.c:4040 [inline] slab_alloc_node mm/slub.c:4089 [inline] kmem_cache_alloc_noprof+0x135/0x2a0 mm/slub.c:4096 getname_flags+0xb7/0x540 fs/namei.c:139 vfs_fstatat+0x12c/0x190 fs/stat.c:378 __do_sys_newfstatat fs/stat.c:543 [inline] __se_sys_newfstatat fs/stat.c:537 [inline] __x64_sys_newfstatat+0x11d/0x1a0 fs/stat.c:537 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f Memory state around the buggy address: ffff888079eddb80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888079eddc00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff888079eddc80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888079eddd00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888079eddd80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================