EXT4-fs error (device loop5): ext4_mb_generate_buddy:1220: group 0, block bitmap and bg descriptor inconsistent: 25 vs 150994969 free clusters ================================================================== BUG: KCSAN: data-race in _prb_read_valid / prb_reserve write to 0xffffffff866fbd98 of 8 bytes by task 25663 on cpu 1: prb_reserve+0x740/0xb60 vprintk_store+0x558/0x870 kernel/printk/printk.c:2326 vprintk_emit+0x15e/0x680 kernel/printk/printk.c:2408 vprintk_default+0x26/0x30 kernel/printk/printk.c:2447 vprintk+0x75/0x80 kernel/printk/printk_safe.c:86 _printk+0x7a/0xa0 kernel/printk/printk.c:2457 __ext4_msg+0x18e/0x1a0 fs/ext4/super.c:998 ext4_print_free_blocks+0x90/0x190 fs/ext4/inode.c:1625 mpage_map_and_submit_extent fs/ext4/inode.c:2300 [inline] ext4_do_writepages+0x19ec/0x2130 fs/ext4/inode.c:2735 ext4_writepages+0x159/0x2e0 fs/ext4/inode.c:2824 do_writepages+0x1d8/0x480 mm/page-writeback.c:2702 filemap_fdatawrite_wbc mm/filemap.c:397 [inline] __filemap_fdatawrite_range mm/filemap.c:430 [inline] file_write_and_wait_range+0x168/0x2f0 mm/filemap.c:787 generic_buffers_fsync_noflush+0x46/0x120 fs/buffer.c:600 ext4_fsync_nojournal fs/ext4/fsync.c:88 [inline] ext4_sync_file+0x1ff/0x6c0 fs/ext4/fsync.c:151 vfs_fsync_range+0x116/0x130 fs/sync.c:187 generic_write_sync include/linux/fs.h:2904 [inline] ext4_buffered_write_iter+0x326/0x370 fs/ext4/file.c:305 ext4_file_write_iter+0x383/0xf20 iter_file_splice_write+0x5f1/0x980 fs/splice.c:743 do_splice_from fs/splice.c:941 [inline] direct_splice_actor+0x160/0x2c0 fs/splice.c:1164 splice_direct_to_actor+0x302/0x670 fs/splice.c:1108 do_splice_direct_actor fs/splice.c:1207 [inline] do_splice_direct+0xd7/0x150 fs/splice.c:1233 do_sendfile+0x398/0x660 fs/read_write.c:1363 __do_sys_sendfile64 fs/read_write.c:1424 [inline] __se_sys_sendfile64 fs/read_write.c:1410 [inline] __x64_sys_sendfile64+0x110/0x150 fs/read_write.c:1410 x64_sys_call+0xfbd/0x2dc0 arch/x86/include/generated/asm/syscalls_64.h:41 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xc9/0x1c0 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f read to 0xffffffff866fbd98 of 8 bytes by task 53 on cpu 0: desc_read kernel/printk/printk_ringbuffer.c:486 [inline] desc_read_finalized_seq kernel/printk/printk_ringbuffer.c:1874 [inline] prb_read kernel/printk/printk_ringbuffer.c:1922 [inline] _prb_read_valid+0x1ec/0xba0 kernel/printk/printk_ringbuffer.c:2113 desc_update_last_finalized kernel/printk/printk_ringbuffer.c:1515 [inline] prb_final_commit+0x144/0x1f0 kernel/printk/printk_ringbuffer.c:1782 vprintk_store+0x7eb/0x870 kernel/printk/printk.c:2310 vprintk_emit+0x15e/0x680 kernel/printk/printk.c:2408 vprintk_default+0x26/0x30 kernel/printk/printk.c:2447 vprintk+0x75/0x80 kernel/printk/printk_safe.c:86 _printk+0x7a/0xa0 kernel/printk/printk.c:2457 __ext4_grp_locked_error+0x5b0/0x7b0 fs/ext4/super.c:1071 ext4_mb_generate_buddy+0x247/0x2d0 fs/ext4/mballoc.c:1217 ext4_mb_init_cache+0x848/0xbc0 fs/ext4/mballoc.c:1406 ext4_mb_init_group+0x210/0x3b0 fs/ext4/mballoc.c:1543 ext4_mb_good_group_nolock fs/ext4/mballoc.c:2704 [inline] ext4_mb_regular_allocator+0xb1f/0x2390 fs/ext4/mballoc.c:2903 ext4_mb_new_blocks+0x801/0x2020 fs/ext4/mballoc.c:6217 ext4_ext_map_blocks+0x1008/0x35c0 fs/ext4/extents.c:4379 ext4_map_create_blocks fs/ext4/inode.c:516 [inline] ext4_map_blocks+0x5aa/0xd20 fs/ext4/inode.c:702 mpage_map_one_extent fs/ext4/inode.c:2219 [inline] mpage_map_and_submit_extent fs/ext4/inode.c:2272 [inline] ext4_do_writepages+0x14c3/0x2130 fs/ext4/inode.c:2735 ext4_writepages+0x159/0x2e0 fs/ext4/inode.c:2824 do_writepages+0x1d8/0x480 mm/page-writeback.c:2702 __writeback_single_inode+0x89/0x850 fs/fs-writeback.c:1680 writeback_sb_inodes+0x461/0xa30 fs/fs-writeback.c:1976 wb_writeback+0x262/0x640 fs/fs-writeback.c:2156 wb_do_writeback fs/fs-writeback.c:2303 [inline] wb_workfn+0x1a8/0x940 fs/fs-writeback.c:2343 process_one_work kernel/workqueue.c:3229 [inline] process_scheduled_works+0x483/0x9a0 kernel/workqueue.c:3310 worker_thread+0x51d/0x6f0 kernel/workqueue.c:3391 kthread+0x1d1/0x210 kernel/kthread.c:389 ret_from_fork+0x4b/0x60 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244 value changed: 0x00000000000032e1 -> 0x00000000000052e1 Reported by Kernel Concurrency Sanitizer on: CPU: 0 UID: 0 PID: 53 Comm: kworker/u8:4 Not tainted 6.13.0-rc3-syzkaller-00044-gaef25be35d23 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/25/2024 Workqueue: writeback wb_workfn (flush-7:5) ================================================================== EXT4-fs (loop5): Delayed block allocation failed for inode 15 at logical offset 0 with max blocks 1 with error 28 EXT4-fs (loop5): This should not happen!! Data will be lost EXT4-fs (loop5): Total free blocks count 0 EXT4-fs (loop5): Free/Dirty block details EXT4-fs (loop5): free_blocks=2415919104 EXT4-fs (loop5): dirty_blocks=8224 EXT4-fs (loop5): Block reservation details EXT4-fs (loop5): i_reserved_data_blocks=514 EXT4-fs (loop5): Delayed block allocation failed for inode 15 at logical offset 18 with max blocks 2048 with error 28 EXT4-fs (loop5): This should not happen!! Data will be lost