EXT4-fs (loop2): mounted filesystem 00000000-0000-0000-0000-000000000000 r/w without journal. Quota mode: none. ================================================================== BUG: KASAN: stack-out-of-bounds in __lock_acquire+0x77/0x1fd0 kernel/locking/lockdep.c:5005 Read of size 8 at addr ffffc9000a037898 by task syz-executor.2/4941 CPU: 1 PID: 4941 Comm: syz-executor.2 Not tainted 6.8.0-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/29/2024 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x1e7/0x2e0 lib/dump_stack.c:106 print_address_description mm/kasan/report.c:377 [inline] print_report+0x167/0x540 mm/kasan/report.c:488 kasan_report+0x142/0x180 mm/kasan/report.c:601 __lock_acquire+0x77/0x1fd0 kernel/locking/lockdep.c:5005 lock_acquire+0x1e3/0x530 kernel/locking/lockdep.c:5754 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0xd5/0x120 kernel/locking/spinlock.c:162 down+0x39/0xc0 kernel/locking/semaphore.c:59 xfs_buf_lock+0x154/0x4c0 fs/xfs/xfs_buf.c:1126 xfs_buf_delwri_submit_buffers+0x14f/0x960 fs/xfs/xfs_buf.c:2210 xfs_buf_delwri_submit+0xba/0x270 fs/xfs/xfs_buf.c:2288 xfs_qm_shrink_scan+0x1ee/0x400 fs/xfs/xfs_qm.c:521 do_shrink_slab+0x6d0/0x1140 mm/shrinker.c:435 shrink_slab+0x1092/0x14d0 mm/shrinker.c:662 drop_slab_node mm/vmscan.c:387 [inline] drop_slab+0x148/0x290 mm/vmscan.c:405 drop_caches_sysctl_handler+0xbc/0x160 fs/drop_caches.c:68 proc_sys_call_handler+0x550/0x8b0 fs/proc/proc_sysctl.c:595 call_write_iter include/linux/fs.h:2087 [inline] new_sync_write fs/read_write.c:497 [inline] vfs_write+0xa81/0xcb0 fs/read_write.c:590 ksys_pwrite64 fs/read_write.c:705 [inline] __do_sys_pwrite64 fs/read_write.c:715 [inline] __se_sys_pwrite64 fs/read_write.c:712 [inline] __x64_sys_pwrite64+0x1aa/0x230 fs/read_write.c:712 do_syscall_64+0xf9/0x240 entry_SYSCALL_64_after_hwframe+0x6f/0x77 RIP: 0033:0x7f0374a7dda9 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:00007f03757120c8 EFLAGS: 00000246 ORIG_RAX: 0000000000000012 RAX: ffffffffffffffda RBX: 00007f0374babf80 RCX: 00007f0374a7dda9 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000004 RBP: 00007f0374aca47a R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 000000000000000b R14: 00007f0374babf80 R15: 00007ffec74fcb08 The buggy address belongs to the virtual mapping at [ffffc9000a030000, ffffc9000a039000) created by: copy_process+0x5d5/0x3fc0 kernel/fork.c:2327 The buggy address belongs to the physical page: page:ffffea0000860c00 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x21830 memcg:ffff888029c96e82 flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) page_type: 0xffffffff() raw: 00fff00000000000 0000000000000000 dead000000000122 0000000000000000 raw: 0000000000000000 0000000000000000 00000001ffffffff ffff888029c96e82 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 1486238947876, free_ts 1483367584140 set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook+0x1ea/0x210 mm/page_alloc.c:1533 prep_new_page mm/page_alloc.c:1540 [inline] get_page_from_freelist+0x33ea/0x3580 mm/page_alloc.c:3311 __alloc_pages+0x255/0x680 mm/page_alloc.c:4569 alloc_pages_mpol+0x3de/0x650 mm/mempolicy.c:2133 vm_area_alloc_pages mm/vmalloc.c:3063 [inline] __vmalloc_area_node mm/vmalloc.c:3139 [inline] __vmalloc_node_range+0x9a3/0x14a0 mm/vmalloc.c:3320 alloc_thread_stack_node kernel/fork.c:307 [inline] dup_task_struct+0x3e9/0x7d0 kernel/fork.c:1112 copy_process+0x5d5/0x3fc0 kernel/fork.c:2327 kernel_clone+0x222/0x840 kernel/fork.c:2902 kernel_thread+0x1bc/0x240 kernel/fork.c:2964 create_kthread kernel/kthread.c:411 [inline] kthreadd+0x60c/0x810 kernel/kthread.c:764 ret_from_fork+0x4b/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x1b/0x30 arch/x86/entry/entry_64.S:243 page last free pid 4680 tgid 4679 stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1140 [inline] free_unref_page_prepare+0x95d/0xa80 mm/page_alloc.c:2346 free_unref_page_list+0x5a3/0x850 mm/page_alloc.c:2532 release_pages+0x2117/0x2400 mm/swap.c:1042 __folio_batch_release+0x84/0x100 mm/swap.c:1062 folio_batch_release include/linux/pagevec.h:83 [inline] mapping_try_invalidate+0x515/0x640 mm/truncate.c:526 btrfs_close_bdev fs/btrfs/volumes.c:1063 [inline] btrfs_close_one_device fs/btrfs/volumes.c:1087 [inline] close_fs_devices+0x455/0x890 fs/btrfs/volumes.c:1129 btrfs_close_devices+0xc8/0x5c0 fs/btrfs/volumes.c:1144 close_ctree+0x7ac/0xd40 fs/btrfs/disk-io.c:4389 generic_shutdown_super+0x136/0x2d0 fs/super.c:641 kill_anon_super+0x3b/0x70 fs/super.c:1225 btrfs_kill_super+0x41/0x50 fs/btrfs/super.c:2093 deactivate_locked_super+0xc4/0x130 fs/super.c:472 cleanup_mnt+0x426/0x4c0 fs/namespace.c:1267 task_work_run+0x24e/0x310 kernel/task_work.c:180 resume_user_mode_work include/linux/resume_user_mode.h:50 [inline] exit_to_user_mode_loop kernel/entry/common.c:108 [inline] exit_to_user_mode_prepare include/linux/entry-common.h:328 [inline] __syscall_exit_to_user_mode_work kernel/entry/common.c:201 [inline] syscall_exit_to_user_mode+0x167/0x360 kernel/entry/common.c:212 do_syscall_64+0x108/0x240 arch/x86/entry/common.c:89 Memory state around the buggy address: ffffc9000a037780: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffffc9000a037800: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffffc9000a037880: f3 f3 f3 f3 f3 f3 f3 f3 00 00 00 00 00 00 00 00 ^ ffffc9000a037900: 00 00 00 00 00 00 00 00 00 00 00 00 f1 f1 f1 f1 ffffc9000a037980: 00 00 f3 f3 00 00 00 00 00 00 00 00 00 00 00 00 ==================================================================