XFS (loop3): Quotacheck: Done. ================================================================== BUG: KASAN: stack-out-of-bounds in __lock_acquire+0x79/0x1f60 kernel/locking/lockdep.c:4925 Read of size 8 at addr ffffc90015b8f918 by task syz-executor.3/32294 CPU: 0 PID: 32294 Comm: syz-executor.3 Not tainted 6.2.0-rc2-syzkaller-00057-g41c03ba9beea #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x1b1/0x290 lib/dump_stack.c:106 print_address_description+0x74/0x340 mm/kasan/report.c:306 print_report+0x107/0x1f0 mm/kasan/report.c:417 kasan_report+0xcd/0x100 mm/kasan/report.c:517 __lock_acquire+0x79/0x1f60 kernel/locking/lockdep.c:4925 lock_acquire+0x182/0x3c0 kernel/locking/lockdep.c:5668 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0xb3/0x100 kernel/locking/spinlock.c:162 down+0x35/0xb0 kernel/locking/semaphore.c:59 xfs_buf_lock fs/xfs/xfs_buf.c:1120 [inline] xfs_buf_delwri_submit_buffers+0x22e/0x820 fs/xfs/xfs_buf.c:2165 xfs_buf_delwri_submit+0xbb/0x320 fs/xfs/xfs_buf.c:2243 xfs_qm_shrink_scan+0x1ca/0x410 fs/xfs/xfs_qm.c:522 do_shrink_slab+0x4e1/0xa00 mm/vmscan.c:843 shrink_slab+0x1e6/0x340 mm/vmscan.c:1003 drop_slab_node mm/vmscan.c:1031 [inline] drop_slab+0x164/0x2b0 mm/vmscan.c:1049 drop_caches_sysctl_handler+0xb1/0x160 fs/drop_caches.c:66 proc_sys_call_handler+0x576/0x890 fs/proc/proc_sysctl.c:604 call_write_iter include/linux/fs.h:2186 [inline] new_sync_write fs/read_write.c:491 [inline] vfs_write+0x7dc/0xc50 fs/read_write.c:584 ksys_write+0x177/0x2a0 fs/read_write.c:637 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7f984088c0c9 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:00007f9841577168 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 00007f98409abf80 RCX: 00007f984088c0c9 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000004 RBP: 00007f98408e7ae9 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffe7cb71bdf R14: 00007f9841577300 R15: 0000000000022000 The buggy address belongs to the virtual mapping at [ffffc90015b88000, ffffc90015b91000) created by: dup_task_struct+0x8b/0x490 kernel/fork.c:987 The buggy address belongs to the physical page: page:ffffea0001e95980 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x7a566 memcg:ffff88802a271c82 flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000000 0000000000000000 dead000000000122 0000000000000000 raw: 0000000000000000 0000000000000000 00000001ffffffff ffff88802a271c82 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 32282, tgid 32282 (syz-executor.1), ts 1157093928675, free_ts 1157053327644 prep_new_page mm/page_alloc.c:2531 [inline] get_page_from_freelist+0x742/0x7c0 mm/page_alloc.c:4283 __alloc_pages+0x259/0x560 mm/page_alloc.c:5549 vm_area_alloc_pages mm/vmalloc.c:2989 [inline] __vmalloc_area_node mm/vmalloc.c:3057 [inline] __vmalloc_node_range+0x9b2/0x1400 mm/vmalloc.c:3227 alloc_thread_stack_node+0x307/0x500 kernel/fork.c:311 dup_task_struct+0x8b/0x490 kernel/fork.c:987 copy_process+0x53c/0x3f00 kernel/fork.c:2097 kernel_clone+0x21b/0x630 kernel/fork.c:2681 __do_sys_clone kernel/fork.c:2822 [inline] __se_sys_clone kernel/fork.c:2806 [inline] __x64_sys_clone+0x228/0x290 kernel/fork.c:2806 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1446 [inline] free_pcp_prepare+0x751/0x780 mm/page_alloc.c:1496 free_unref_page_prepare mm/page_alloc.c:3369 [inline] free_unref_page_list+0xb2/0x830 mm/page_alloc.c:3510 release_pages+0x233e/0x25e0 mm/swap.c:1076 __pagevec_release+0x7d/0xf0 mm/swap.c:1096 pagevec_release include/linux/pagevec.h:71 [inline] folio_batch_release include/linux/pagevec.h:135 [inline] invalidate_mapping_pagevec+0x509/0x640 mm/truncate.c:536 xfs_free_buftarg+0x79/0xd0 fs/xfs/xfs_buf.c:1948 xfs_fs_put_super+0x24d/0x2d0 fs/xfs/xfs_super.c:1123 generic_shutdown_super+0x130/0x310 fs/super.c:492 kill_block_super+0x79/0xd0 fs/super.c:1386 deactivate_locked_super+0xa7/0xf0 fs/super.c:332 cleanup_mnt+0x494/0x520 fs/namespace.c:1291 task_work_run+0x243/0x300 kernel/task_work.c:179 resume_user_mode_work include/linux/resume_user_mode.h:49 [inline] exit_to_user_mode_loop+0x124/0x150 kernel/entry/common.c:171 exit_to_user_mode_prepare+0xb2/0x140 kernel/entry/common.c:203 __syscall_exit_to_user_mode_work kernel/entry/common.c:285 [inline] syscall_exit_to_user_mode+0x26/0x60 kernel/entry/common.c:296 do_syscall_64+0x49/0xb0 arch/x86/entry/common.c:86 Memory state around the buggy address: ffffc90015b8f800: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffffc90015b8f880: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffffc90015b8f900: f3 f3 f3 f3 f3 f3 f3 f3 00 00 00 00 00 00 00 00 ^ ffffc90015b8f980: 00 00 00 00 00 00 00 00 00 00 00 00 f1 f1 f1 f1 ffffc90015b8fa00: 00 00 f3 f3 00 00 00 00 00 00 00 00 00 00 00 00 ==================================================================