XFS (loop4): Quotacheck: Done. ================================================================== BUG: KASAN: stack-out-of-bounds in debug_spin_lock_before kernel/locking/spinlock_debug.c:85 [inline] BUG: KASAN: stack-out-of-bounds in do_raw_spin_lock+0x2bf/0x3a0 kernel/locking/spinlock_debug.c:114 Read of size 4 at addr ffffc9000b187884 by task syz-executor.4/5969 CPU: 0 PID: 5969 Comm: syz-executor.4 Not tainted 6.5.0-syzkaller-12821-g6099776f9f26 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/04/2023 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x1e7/0x2d0 lib/dump_stack.c:106 print_address_description mm/kasan/report.c:364 [inline] print_report+0x163/0x540 mm/kasan/report.c:475 kasan_report+0x175/0x1b0 mm/kasan/report.c:588 debug_spin_lock_before kernel/locking/spinlock_debug.c:85 [inline] do_raw_spin_lock+0x2bf/0x3a0 kernel/locking/spinlock_debug.c:114 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:111 [inline] _raw_spin_lock_irqsave+0xe1/0x120 kernel/locking/spinlock.c:162 down+0x39/0xc0 kernel/locking/semaphore.c:59 xfs_buf_lock+0x154/0x4b0 fs/xfs/xfs_buf.c:1126 xfs_buf_delwri_submit_buffers+0x14d/0x8e0 fs/xfs/xfs_buf.c:2174 xfs_buf_delwri_submit+0xba/0x260 fs/xfs/xfs_buf.c:2252 xfs_qm_shrink_scan+0x1ce/0x3e0 fs/xfs/xfs_qm.c:522 do_shrink_slab+0x544/0xdb0 mm/vmscan.c:900 shrink_slab+0x232/0x920 mm/vmscan.c:1060 drop_slab_node mm/vmscan.c:1088 [inline] drop_slab+0x148/0x280 mm/vmscan.c:1106 drop_caches_sysctl_handler+0xbc/0x160 fs/drop_caches.c:68 proc_sys_call_handler+0x546/0x8a0 fs/proc/proc_sysctl.c:600 do_iter_write+0x84f/0xde0 fs/read_write.c:860 iter_file_splice_write+0x86d/0x1010 fs/splice.c:736 do_splice_from fs/splice.c:933 [inline] direct_splice_actor+0xea/0x1c0 fs/splice.c:1142 splice_direct_to_actor+0x376/0x9e0 fs/splice.c:1088 do_splice_direct+0x2ac/0x3f0 fs/splice.c:1194 do_sendfile+0x623/0x1070 fs/read_write.c:1254 __do_sys_sendfile64 fs/read_write.c:1316 [inline] __se_sys_sendfile64+0x100/0x1e0 fs/read_write.c:1308 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x41/0xc0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7f531147c859 Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 e1 20 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 b0 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f53121890c8 EFLAGS: 00000246 ORIG_RAX: 0000000000000028 RAX: ffffffffffffffda RBX: 00007f531159bf80 RCX: 00007f531147c859 RDX: 0000000020002080 RSI: 0000000000000004 RDI: 0000000000000005 RBP: 00007f53114d8ad0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000870 R11: 0000000000000246 R12: 0000000000000000 R13: 000000000000000b R14: 00007f531159bf80 R15: 00007fff87ae38d8 The buggy address belongs to the virtual mapping at [ffffc9000b180000, ffffc9000b189000) created by: copy_process+0x5c8/0x4290 kernel/fork.c:2327 The buggy address belongs to the physical page: page:ffffea00009d9a80 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x2766a memcg:ffff888022d0f302 flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) page_type: 0xffffffff() raw: 00fff00000000000 0000000000000000 dead000000000122 0000000000000000 raw: 0000000000000000 0000000000000000 00000001ffffffff ffff888022d0f302 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 0, migratetype Unmovable, gfp_mask 0x102dc2(GFP_HIGHUSER|__GFP_NOWARN|__GFP_ZERO), pid 2, tgid 2 (kthreadd), ts 89492637792, free_ts 89216247407 set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook+0x1e6/0x210 mm/page_alloc.c:1536 prep_new_page mm/page_alloc.c:1543 [inline] get_page_from_freelist+0x31db/0x3360 mm/page_alloc.c:3170 __alloc_pages+0x255/0x670 mm/page_alloc.c:4426 vm_area_alloc_pages mm/vmalloc.c:3063 [inline] __vmalloc_area_node mm/vmalloc.c:3139 [inline] __vmalloc_node_range+0x9a3/0x1490 mm/vmalloc.c:3320 alloc_thread_stack_node kernel/fork.c:309 [inline] dup_task_struct+0x3e5/0x7d0 kernel/fork.c:1118 copy_process+0x5c8/0x4290 kernel/fork.c:2327 kernel_clone+0x22d/0x7b0 kernel/fork.c:2909 kernel_thread+0x1bc/0x230 kernel/fork.c:2971 create_kthread kernel/kthread.c:411 [inline] kthreadd+0x600/0x820 kernel/kthread.c:746 ret_from_fork+0x48/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:304 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1136 [inline] free_unref_page_prepare+0x8c3/0x9f0 mm/page_alloc.c:2312 free_unref_page_list+0x596/0x830 mm/page_alloc.c:2451 release_pages+0x2113/0x23f0 mm/swap.c:1042 tlb_batch_pages_flush mm/mmu_gather.c:98 [inline] tlb_flush_mmu_free mm/mmu_gather.c:293 [inline] tlb_flush_mmu+0x34c/0x4e0 mm/mmu_gather.c:300 tlb_finish_mmu+0xd4/0x1f0 mm/mmu_gather.c:392 exit_mmap+0x4d3/0xc50 mm/mmap.c:3223 __mmput+0x115/0x3c0 kernel/fork.c:1349 exec_mmap+0x669/0x700 fs/exec.c:1037 begin_new_exec+0x66e/0xf20 fs/exec.c:1296 load_elf_binary+0x95d/0x2760 fs/binfmt_elf.c:1001 search_binary_handler fs/exec.c:1739 [inline] exec_binprm fs/exec.c:1781 [inline] bprm_execve+0x90e/0x1740 fs/exec.c:1856 do_execveat_common+0x580/0x720 fs/exec.c:1964 do_execve fs/exec.c:2038 [inline] __do_sys_execve fs/exec.c:2114 [inline] __se_sys_execve fs/exec.c:2109 [inline] __x64_sys_execve+0x92/0xa0 fs/exec.c:2109 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x41/0xc0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd Memory state around the buggy address: ffffc9000b187780: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffffc9000b187800: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffffc9000b187880: f3 f3 f3 f3 f3 f3 f3 f3 00 00 00 00 00 00 00 00 ^ ffffc9000b187900: 00 00 00 00 00 00 00 00 00 00 00 00 f1 f1 f1 f1 ffffc9000b187980: 00 00 f3 f3 00 00 00 00 00 00 00 00 00 00 00 00 ==================================================================