EXT4-fs error (device loop5): ext4_validate_block_bitmap:432: comm syz.5.4093: bg 0: block 16: invalid block bitmap ================================================================== BUG: KCSAN: data-race in _prb_read_valid / prb_reserve write to 0xffffffff866d4308 of 8 bytes by task 3016 on cpu 1: prb_reserve+0x740/0xb60 vprintk_store+0x53f/0x810 kernel/printk/printk.c:2301 vprintk_emit+0x15e/0x680 kernel/printk/printk.c:2383 vprintk_default+0x26/0x30 kernel/printk/printk.c:2422 vprintk+0x75/0x80 kernel/printk/printk_safe.c:68 _printk+0x7a/0xa0 kernel/printk/printk.c:2432 blk_add_partition block/partitions/core.c:541 [inline] blk_add_partitions block/partitions/core.c:625 [inline] bdev_disk_changed+0x87f/0xb90 block/partitions/core.c:685 blkdev_get_whole+0x1eb/0x2d0 block/bdev.c:707 bdev_open+0x289/0x860 block/bdev.c:916 bdev_file_open_by_dev+0x1c3/0x220 block/bdev.c:1018 disk_scan_partitions+0x13f/0x1a0 block/genhd.c:367 blkdev_common_ioctl+0xe33/0x1930 block/ioctl.c:617 blkdev_ioctl+0x2f9/0x450 block/ioctl.c:687 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:907 [inline] __se_sys_ioctl+0xcd/0x140 fs/ioctl.c:893 __x64_sys_ioctl+0x43/0x50 fs/ioctl.c:893 x64_sys_call+0x15cc/0x2d60 arch/x86/include/generated/asm/syscalls_64.h:17 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 0xffffffff866d4308 of 8 bytes by task 15645 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 prb_read_valid+0x3d/0x60 kernel/printk/printk_ringbuffer.c:2182 printk_get_next_message+0xd8/0x6f0 kernel/printk/printk.c:2963 console_emit_next_record kernel/printk/printk.c:3046 [inline] console_flush_all+0x28a/0x770 kernel/printk/printk.c:3180 __console_flush_and_unlock kernel/printk/printk.c:3239 [inline] console_unlock+0xab/0x330 kernel/printk/printk.c:3279 vprintk_emit+0x3f4/0x680 kernel/printk/printk.c:2407 vprintk_default+0x26/0x30 kernel/printk/printk.c:2422 vprintk+0x75/0x80 kernel/printk/printk_safe.c:68 _printk+0x7a/0xa0 kernel/printk/printk.c:2432 __ext4_error+0x221/0x310 fs/ext4/super.c:823 ext4_validate_block_bitmap+0x8f9/0x9a0 fs/ext4/balloc.c:431 ext4_wait_block_bitmap+0xeb/0x160 fs/ext4/balloc.c:591 ext4_mb_init_cache+0x31c/0xbc0 fs/ext4/mballoc.c:1352 ext4_mb_init_group+0x210/0x3b0 fs/ext4/mballoc.c:1543 ext4_mb_load_buddy_gfp+0x6e0/0x750 fs/ext4/mballoc.c:1613 ext4_mb_clear_bb fs/ext4/mballoc.c:6451 [inline] ext4_free_blocks+0x75c/0x14b0 fs/ext4/mballoc.c:6652 ext4_clear_blocks+0x2a3/0x2c0 fs/ext4/indirect.c:888 ext4_free_data fs/ext4/indirect.c:962 [inline] ext4_ind_truncate+0x5d5/0x880 fs/ext4/indirect.c:1154 ext4_truncate+0x751/0xb10 fs/ext4/inode.c:4187 ext4_process_orphan+0x113/0x1c0 fs/ext4/orphan.c:339 ext4_orphan_cleanup+0x696/0x9e0 fs/ext4/orphan.c:474 __ext4_fill_super fs/ext4/super.c:5563 [inline] ext4_fill_super+0x36b3/0x3a10 fs/ext4/super.c:5686 get_tree_bdev_flags+0x29f/0x310 fs/super.c:1636 get_tree_bdev+0x1f/0x30 fs/super.c:1659 ext4_get_tree+0x1c/0x30 fs/ext4/super.c:5718 vfs_get_tree+0x56/0x1e0 fs/super.c:1814 do_new_mount+0x227/0x690 fs/namespace.c:3507 path_mount+0x49b/0xb30 fs/namespace.c:3834 do_mount fs/namespace.c:3847 [inline] __do_sys_mount fs/namespace.c:4057 [inline] __se_sys_mount+0x27c/0x2d0 fs/namespace.c:4034 __x64_sys_mount+0x67/0x80 fs/namespace.c:4034 x64_sys_call+0x203e/0x2d60 arch/x86/include/generated/asm/syscalls_64.h:166 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 value changed: 0x0000000000000ba7 -> 0x0000000000000000 Reported by Kernel Concurrency Sanitizer on: CPU: 0 UID: 0 PID: 15645 Comm: syz.5.4093 Not tainted 6.12.0-rc7-syzkaller-00192-gb5a24181e461 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/30/2024 ================================================================== EXT4-fs (loop5): Remounting filesystem read-only EXT4-fs (loop5): 1 truncate cleaned up EXT4-fs (loop5): mounted filesystem 00000000-0000-0000-0000-000000000000 r/w without journal. Quota mode: none. SELinux: (dev loop5, type ext4) getxattr errno 5 EXT4-fs (loop5): unmounting filesystem 00000000-0000-0000-0000-000000000000.