XFS (loop2): Filesystem has been shut down due to log error (0x2). XFS (loop2): Please unmount the filesystem and rectify the problem(s). ================================================================== BUG: KASAN: slab-use-after-free in instrument_atomic_write include/linux/instrumented.h:82 [inline] BUG: KASAN: slab-use-after-free in set_bit include/asm-generic/bitops/instrumented-atomic.h:28 [inline] BUG: KASAN: slab-use-after-free in xlog_cil_ail_insert fs/xfs/xfs_log_cil.c:798 [inline] BUG: KASAN: slab-use-after-free in xlog_cil_committed+0x3e3/0xd40 fs/xfs/xfs_log_cil.c:904 Write of size 8 at addr ffff88811912e190 by task kworker/0:1H/41 CPU: 0 UID: 0 PID: 41 Comm: kworker/0:1H Not tainted syzkaller #0 PREEMPT(undef) Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/12/2025 Workqueue: xfs-log/loop2 xlog_ioend_work Call Trace: dump_stack_lvl+0xf4/0x170 lib/dump_stack.c:120 print_address_description mm/kasan/report.c:408 [inline] print_report+0xd2/0x2b0 mm/kasan/report.c:521 kasan_report+0x118/0x150 mm/kasan/report.c:634 check_region_inline mm/kasan/generic.c:-1 [inline] kasan_check_range+0x2b0/0x2c0 mm/kasan/generic.c:189 instrument_atomic_write include/linux/instrumented.h:82 [inline] set_bit include/asm-generic/bitops/instrumented-atomic.h:28 [inline] xlog_cil_ail_insert fs/xfs/xfs_log_cil.c:798 [inline] xlog_cil_committed+0x3e3/0xd40 fs/xfs/xfs_log_cil.c:904 xlog_cil_process_committed+0x145/0x180 fs/xfs/xfs_log_cil.c:934 xlog_state_shutdown_callbacks+0x244/0x340 fs/xfs/xfs_log.c:488 xlog_force_shutdown+0x286/0x320 fs/xfs/xfs_log.c:3520 xlog_ioend_work+0x98/0xe0 fs/xfs/xfs_log.c:1245 process_one_work kernel/workqueue.c:3238 [inline] process_scheduled_works+0x995/0x12d0 kernel/workqueue.c:3321 worker_thread+0x850/0xc60 kernel/workqueue.c:3402 kthread+0x598/0x690 kernel/kthread.c:464 ret_from_fork+0x139/0x2d0 arch/x86/kernel/process.c:148 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 Allocated by task 4006: kasan_save_stack mm/kasan/common.c:47 [inline] kasan_save_track+0x3e/0x80 mm/kasan/common.c:68 unpoison_slab_object mm/kasan/common.c:319 [inline] __kasan_slab_alloc+0x6c/0x80 mm/kasan/common.c:345 kasan_slab_alloc include/linux/kasan.h:250 [inline] slab_post_alloc_hook mm/slub.c:4148 [inline] slab_alloc_node mm/slub.c:4197 [inline] kmem_cache_alloc_noprof+0x1b1/0x400 mm/slub.c:4204 xfs_buf_item_init+0x5e/0x5f0 fs/xfs/xfs_buf_item.c:815 _xfs_trans_bjoin+0x41/0xf0 fs/xfs/xfs_trans_buf.c:75 xfs_trans_read_buf_map+0x279/0x800 fs/xfs/xfs_trans_buf.c:325 xfs_trans_read_buf fs/xfs/xfs_trans.h:212 [inline] xfs_btree_read_buf_block+0x24e/0x3d0 fs/xfs/libxfs/xfs_btree.c:1402 xfs_btree_lookup_get_block+0x24d/0x460 fs/xfs/libxfs/xfs_btree.c:1907 xfs_btree_lookup+0x3e2/0xf60 fs/xfs/libxfs/xfs_btree.c:2018 xfs_alloc_lookup fs/xfs/libxfs/xfs_alloc.c:166 [inline] xfs_alloc_lookup_eq fs/xfs/libxfs/xfs_alloc.c:184 [inline] xfs_alloc_fixup_trees+0x1fd/0xbb0 fs/xfs/libxfs/xfs_alloc.c:626 xfs_alloc_cur_finish+0xd1/0x3a0 fs/xfs/libxfs/xfs_alloc.c:1117 xfs_alloc_ag_vextent_near+0x966/0xd40 fs/xfs/libxfs/xfs_alloc.c:1776 xfs_alloc_vextent_iterate_ags+0x43e/0x640 fs/xfs/libxfs/xfs_alloc.c:3764 xfs_alloc_vextent_start_ag+0x250/0x5c0 fs/xfs/libxfs/xfs_alloc.c:3839 xfs_bmap_btalloc_best_length fs/xfs/libxfs/xfs_bmap.c:3627 [inline] xfs_bmap_btalloc fs/xfs/libxfs/xfs_bmap.c:3672 [inline] xfs_bmapi_allocate+0x1183/0x22b0 fs/xfs/libxfs/xfs_bmap.c:3947 xfs_bmapi_write+0x637/0xee0 fs/xfs/libxfs/xfs_bmap.c:4276 xfs_da_grow_inode_int+0x25d/0x770 fs/xfs/libxfs/xfs_da_btree.c:2315 xfs_da_grow_inode+0xf3/0x250 fs/xfs/libxfs/xfs_da_btree.c:2380 xfs_attr_shortform_to_leaf+0x1f3/0x710 fs/xfs/libxfs/xfs_attr_leaf.c:965 xfs_attr_sf_addname fs/xfs/libxfs/xfs_attr.c:402 [inline] xfs_attr_set_iter+0xb6d/0x3c10 fs/xfs/libxfs/xfs_attr.c:824 xfs_attr_finish_item+0xc2/0x290 fs/xfs/xfs_attr_item.c:505 xfs_defer_finish_one+0x30a/0xaa0 fs/xfs/libxfs/xfs_defer.c:595 xfs_defer_finish_noroll+0x6ba/0xd40 fs/xfs/libxfs/xfs_defer.c:707 xfs_trans_commit+0xa7/0x120 fs/xfs/xfs_trans.c:949 xfs_attr_set+0xb7c/0xf10 fs/xfs/libxfs/xfs_attr.c:1150 xfs_xattr_set+0x127/0x1f0 fs/xfs/xfs_xattr.c:186 __vfs_setxattr+0x350/0x390 fs/xattr.c:200 __vfs_setxattr_noperm+0x109/0x520 fs/xattr.c:234 vfs_setxattr+0x16e/0x290 fs/xattr.c:321 do_setxattr fs/xattr.c:636 [inline] filename_setxattr+0x24b/0x510 fs/xattr.c:665 path_setxattrat+0x22d/0x2a0 fs/xattr.c:713 __do_sys_setxattr fs/xattr.c:747 [inline] __se_sys_setxattr fs/xattr.c:743 [inline] __x64_sys_setxattr+0xb7/0xd0 fs/xattr.c:743 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0x8f/0x250 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f Freed by task 753: kasan_save_stack mm/kasan/common.c:47 [inline] kasan_save_track+0x3e/0x80 mm/kasan/common.c:68 kasan_save_free_info+0x46/0x50 mm/kasan/generic.c:576 poison_slab_object mm/kasan/common.c:247 [inline] __kasan_slab_free+0x62/0x70 mm/kasan/common.c:264 kasan_slab_free include/linux/kasan.h:233 [inline] slab_free_hook mm/slub.c:2381 [inline] slab_free mm/slub.c:4643 [inline] kmem_cache_free+0x175/0x460 mm/slub.c:4745 __xfs_buf_ioend+0x2fa/0x550 fs/xfs/xfs_buf.c:1202 xfs_buf_iowait+0x39/0x250 fs/xfs/xfs_buf.c:1384 _xfs_buf_read fs/xfs/xfs_buf.c:646 [inline] xfs_buf_read_map+0x265/0x830 fs/xfs/xfs_buf.c:712 xfs_trans_read_buf_map+0x1f6/0x800 fs/xfs/xfs_trans_buf.c:304 xfs_trans_read_buf fs/xfs/xfs_trans.h:212 [inline] xfs_btree_read_buf_block+0x24e/0x3d0 fs/xfs/libxfs/xfs_btree.c:1402 xfs_btree_lookup_get_block+0x24d/0x460 fs/xfs/libxfs/xfs_btree.c:1907 xfs_btree_lookup+0x3e2/0xf60 fs/xfs/libxfs/xfs_btree.c:2018 xfs_alloc_lookup fs/xfs/libxfs/xfs_alloc.c:166 [inline] xfs_alloc_lookup_le fs/xfs/libxfs/xfs_alloc.c:212 [inline] xfs_free_ag_extent+0x200/0x12a0 fs/xfs/libxfs/xfs_alloc.c:2080 __xfs_free_extent+0x287/0x3e0 fs/xfs/libxfs/xfs_alloc.c:4048 xfs_extent_free_finish_item+0x22e/0x670 fs/xfs/xfs_extfree_item.c:552 xfs_defer_finish_one+0x30a/0xaa0 fs/xfs/libxfs/xfs_defer.c:595 xfs_defer_finish_noroll+0x6ba/0xd40 fs/xfs/libxfs/xfs_defer.c:707 xfs_defer_finish+0x14/0x130 fs/xfs/libxfs/xfs_defer.c:741 xfs_bunmapi_range+0x97/0xe0 fs/xfs/libxfs/xfs_bmap.c:6178 xfs_itruncate_extents_flags+0x21d/0x5f0 fs/xfs/xfs_inode.c:1066 xfs_itruncate_extents fs/xfs/xfs_inode.h:593 [inline] xfs_inactive_truncate+0x10a/0x170 fs/xfs/xfs_inode.c:1168 xfs_inactive+0x608/0x840 fs/xfs/xfs_inode.c:1454 xfs_inodegc_inactivate fs/xfs/xfs_icache.c:1947 [inline] xfs_inodegc_worker+0x25e/0x520 fs/xfs/xfs_icache.c:1993 process_one_work kernel/workqueue.c:3238 [inline] process_scheduled_works+0x995/0x12d0 kernel/workqueue.c:3321 worker_thread+0x850/0xc60 kernel/workqueue.c:3402 kthread+0x598/0x690 kernel/kthread.c:464 ret_from_fork+0x139/0x2d0 arch/x86/kernel/process.c:148 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 The buggy address belongs to the object at ffff88811912e150 which belongs to the cache xfs_buf_item of size 272 The buggy address is located 64 bytes inside of freed 272-byte region [ffff88811912e150, ffff88811912e260) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x11912e flags: 0x200000000000000(node=0|zone=2) page_type: f5(slab) raw: 0200000000000000 ffff88810b69c3c0 dead000000000122 0000000000000000 raw: 0000000000000000 00000000800c000c 00000000f5000000 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 0, migratetype Unmovable, gfp_mask 0x52c40(GFP_NOFS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP), pid 4006, tgid 4005 (syz.2.23), ts 86989613019, free_ts 86987902442 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x168/0x1a0 mm/page_alloc.c:1704 prep_new_page mm/page_alloc.c:1712 [inline] get_page_from_freelist+0x290d/0x29e0 mm/page_alloc.c:3669 __alloc_frozen_pages_noprof+0x26b/0x460 mm/page_alloc.c:4959 alloc_pages_mpol+0xcb/0x270 mm/mempolicy.c:2419 alloc_slab_page mm/slub.c:2451 [inline] allocate_slab+0x8a/0x350 mm/slub.c:2619 new_slab mm/slub.c:2673 [inline] ___slab_alloc+0x9dc/0x10e0 mm/slub.c:3859 __slab_alloc mm/slub.c:3949 [inline] __slab_alloc_node mm/slub.c:4024 [inline] slab_alloc_node mm/slub.c:4185 [inline] kmem_cache_alloc_noprof+0x26e/0x400 mm/slub.c:4204 xfs_buf_item_init+0x5e/0x5f0 fs/xfs/xfs_buf_item.c:815 _xfs_trans_bjoin+0x41/0xf0 fs/xfs/xfs_trans_buf.c:75 xfs_trans_read_buf_map+0x279/0x800 fs/xfs/xfs_trans_buf.c:325 xfs_trans_read_buf fs/xfs/xfs_trans.h:212 [inline] xfs_btree_read_buf_block+0x24e/0x3d0 fs/xfs/libxfs/xfs_btree.c:1402 xfs_btree_lookup_get_block+0x24d/0x460 fs/xfs/libxfs/xfs_btree.c:1907 xfs_btree_lookup+0x3e2/0xf60 fs/xfs/libxfs/xfs_btree.c:2018 xfs_alloc_lookup fs/xfs/libxfs/xfs_alloc.c:166 [inline] xfs_alloc_lookup_ge fs/xfs/libxfs/xfs_alloc.c:198 [inline] xfs_alloc_cur_setup fs/xfs/libxfs/xfs_alloc.c:966 [inline] xfs_alloc_ag_vextent_near+0x40e/0xd40 fs/xfs/libxfs/xfs_alloc.c:1705 xfs_alloc_vextent_iterate_ags+0x43e/0x640 fs/xfs/libxfs/xfs_alloc.c:3764 xfs_alloc_vextent_start_ag+0x250/0x5c0 fs/xfs/libxfs/xfs_alloc.c:3839 page last free pid 4006 tgid 4005 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1248 [inline] __free_frozen_pages+0xa7a/0xc60 mm/page_alloc.c:2706 __folio_put+0x1b9/0x240 mm/swap.c:112 folio_put include/linux/mm.h:1356 [inline] xfs_buf_free+0x20a/0x3b0 fs/xfs/xfs_buf.c:121 xfs_buf_rele_cached fs/xfs/xfs_buf.c:937 [inline] xfs_buf_rele+0xa15/0xe30 fs/xfs/xfs_buf.c:951 xfs_buftarg_drain+0x27e/0x4a0 fs/xfs/xfs_buf.c:1587 xfs_log_mount_finish+0x2ca/0x320 fs/xfs/xfs_log.c:769 xfs_mountfs+0x12df/0x1b90 fs/xfs/xfs_mount.c:1173 xfs_fs_fill_super+0xe5f/0x1260 fs/xfs/xfs_super.c:1965 get_tree_bdev_flags+0x3d1/0x470 fs/super.c:1679 vfs_get_tree+0x84/0x1a0 fs/super.c:1802 do_new_mount+0x1c7/0x850 fs/namespace.c:3885 do_mount fs/namespace.c:4222 [inline] __do_sys_mount fs/namespace.c:4433 [inline] __se_sys_mount+0x218/0x2b0 fs/namespace.c:4410 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0x8f/0x250 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f Memory state around the buggy address: ffff88811912e080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88811912e100: fb fb fc fc fc fc fc fc fc fc fa fb fb fb fb fb >ffff88811912e180: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88811912e200: fb fb fb fb fb fb fb fb fb fb fb fb fc fc fc fc ffff88811912e280: fc fc fc fc 00 00 00 00 00 00 00 00 00 00 00 00 ==================================================================