syzbot


KCSAN: data-race in has_bh_in_lru / invalidate_bh_lru (8)

Status: moderation: reported on 2025/06/15 11:24
Subsystems: ext4
[Documentation on labels]
Reported-by: syzbot+205e7e59a6508d6d688d@syzkaller.appspotmail.com
First crash: 156d, last: 3d15h
Similar bugs (7)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in has_bh_in_lru / invalidate_bh_lru (4) ext4 6 80 568d 712d 0/29 auto-obsoleted due to no activity on 2024/06/03 21:44
upstream KCSAN: data-race in has_bh_in_lru / invalidate_bh_lru (3) fs 6 1 1005d 1005d 0/29 auto-obsoleted due to no activity on 2023/04/01 03:15
upstream KCSAN: data-race in has_bh_in_lru / invalidate_bh_lru (5) ext4 6 13 394d 511d 0/29 auto-obsoleted due to no activity on 2024/11/24 11:50
upstream KCSAN: data-race in has_bh_in_lru / invalidate_bh_lru fs 6 14 2113d 2180d 0/29 auto-closed as invalid on 2020/04/15 20:03
upstream KCSAN: data-race in has_bh_in_lru / invalidate_bh_lru (2) ext4 exfat 6 213 1049d 1509d 0/29 auto-obsoleted due to no activity on 2023/02/08 20:39
upstream KCSAN: data-race in has_bh_in_lru / invalidate_bh_lru (6) ext4 6 1 356d 356d 0/29 auto-obsoleted due to no activity on 2025/01/22 20:51
upstream KCSAN: data-race in has_bh_in_lru / invalidate_bh_lru (7) ext4 6 6 218d 291d 0/29 auto-obsoleted due to no activity on 2025/06/09 21:46

Sample crash report:
loop1: detected capacity change from 0 to 512
EXT4-fs: Ignoring removed mblk_io_submit option
==================================================================
BUG: KCSAN: data-race in has_bh_in_lru / invalidate_bh_lru

write to 0xffff888237c26fd0 of 8 bytes by task 3322 on cpu 0:
 __invalidate_bh_lrus fs/buffer.c:1529 [inline]
 invalidate_bh_lru+0x8f/0xf0 fs/buffer.c:1541
 csd_do_func kernel/smp.c:136 [inline]
 smp_call_function_many_cond+0x88f/0xc60 kernel/smp.c:868
 on_each_cpu_cond_mask+0x3c/0x80 kernel/smp.c:1043
 on_each_cpu_cond include/linux/smp.h:105 [inline]
 invalidate_bh_lrus+0x2a/0x30 fs/buffer.c:1560
 invalidate_bdev+0x42/0x70 block/bdev.c:100
 ext4_put_super+0x624/0x7d0 fs/ext4/super.c:1348
 generic_shutdown_super+0xe6/0x210 fs/super.c:642
 kill_block_super+0x2a/0x70 fs/super.c:1722
 ext4_kill_sb+0x42/0x80 fs/ext4/super.c:7403
 deactivate_locked_super+0x75/0x1c0 fs/super.c:473
 deactivate_super+0x97/0xa0 fs/super.c:506
 cleanup_mnt+0x269/0x2e0 fs/namespace.c:1327
 __cleanup_mnt+0x19/0x20 fs/namespace.c:1334
 task_work_run+0x131/0x1a0 kernel/task_work.c:227
 resume_user_mode_work include/linux/resume_user_mode.h:50 [inline]
 exit_to_user_mode_loop+0xed/0x110 kernel/entry/common.c:43
 exit_to_user_mode_prepare include/linux/irq-entry-common.h:225 [inline]
 syscall_exit_to_user_mode_work include/linux/entry-common.h:175 [inline]
 syscall_exit_to_user_mode include/linux/entry-common.h:210 [inline]
 do_syscall_64+0x1d6/0x200 arch/x86/entry/syscall_64.c:100
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

read to 0xffff888237c26fd0 of 8 bytes by task 8006 on cpu 1:
 has_bh_in_lru+0x35/0x1f0 fs/buffer.c:1551
 smp_call_function_many_cond+0x2a9/0xc60 kernel/smp.c:821
 on_each_cpu_cond_mask+0x3c/0x80 kernel/smp.c:1043
 on_each_cpu_cond include/linux/smp.h:105 [inline]
 invalidate_bh_lrus+0x2a/0x30 fs/buffer.c:1560
 kill_bdev block/bdev.c:90 [inline]
 set_blocksize+0x24f/0x310 block/bdev.c:207
 sb_set_blocksize block/bdev.c:224 [inline]
 sb_min_blocksize+0xb8/0x140 block/bdev.c:239
 ext4_load_super fs/ext4/super.c:5054 [inline]
 __ext4_fill_super fs/ext4/super.c:5275 [inline]
 ext4_fill_super+0x3a1/0x3810 fs/ext4/super.c:5736
 get_tree_bdev_flags+0x291/0x300 fs/super.c:1691
 get_tree_bdev+0x1f/0x30 fs/super.c:1714
 ext4_get_tree+0x1c/0x30 fs/ext4/super.c:5768
 vfs_get_tree+0x57/0x1d0 fs/super.c:1751
 fc_mount fs/namespace.c:1208 [inline]
 do_new_mount_fc fs/namespace.c:3651 [inline]
 do_new_mount+0x24d/0x660 fs/namespace.c:3727
 path_mount+0x4a5/0xb70 fs/namespace.c:4037
 do_mount fs/namespace.c:4050 [inline]
 __do_sys_mount fs/namespace.c:4238 [inline]
 __se_sys_mount+0x28c/0x2e0 fs/namespace.c:4215
 __x64_sys_mount+0x67/0x80 fs/namespace.c:4215
 x64_sys_call+0x2b51/0x3000 arch/x86/include/generated/asm/syscalls_64.h:166
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0xd2/0x200 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

value changed: 0xffff88811a97a340 -> 0x0000000000000000

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 UID: 0 PID: 8006 Comm: syz.1.1147 Not tainted syzkaller #0 PREEMPT(voluntary) 
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/02/2025
==================================================================
EXT4-fs (loop1): ext4_check_descriptors: Block bitmap for group 0 overlaps superblock
EXT4-fs (loop1): revision level too high, forcing read-only mode
EXT4-fs (loop1): orphan cleanup on readonly fs
EXT4-fs error (device loop1): ext4_read_block_bitmap_nowait:483: comm syz.1.1147: Invalid block bitmap block 0 in block_group 0
EXT4-fs error (device loop1): ext4_read_block_bitmap_nowait:483: comm syz.1.1147: Invalid block bitmap block 0 in block_group 0
EXT4-fs error (device loop1): ext4_read_block_bitmap_nowait:483: comm syz.1.1147: Invalid block bitmap block 0 in block_group 0
EXT4-fs error (device loop1): ext4_acquire_dquot:6945: comm syz.1.1147: Failed to acquire dquot type 1
EXT4-fs (loop1): 1 orphan inode deleted

Crashes (8):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/11/15 13:10 upstream 7a0892d2836e f7988ea4 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in has_bh_in_lru / invalidate_bh_lru
2025/11/14 15:32 upstream 6da43bbeb691 f7988ea4 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in has_bh_in_lru / invalidate_bh_lru
2025/10/12 04:28 upstream 67029a49db6c ff1712fe .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in has_bh_in_lru / invalidate_bh_lru
2025/09/13 08:51 upstream 320475fbd590 e2beed91 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in has_bh_in_lru / invalidate_bh_lru
2025/07/31 06:58 upstream e8d780dcd957 f8f2b4da .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in has_bh_in_lru / invalidate_bh_lru
2025/07/28 03:37 upstream b711733e89a3 fb8f743d .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in has_bh_in_lru / invalidate_bh_lru
2025/07/13 20:31 upstream 5d5d62298b8b 3cda49cf .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in has_bh_in_lru / invalidate_bh_lru
2025/06/15 11:23 upstream 8c6bc74c7f89 5f4b362d .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in has_bh_in_lru / invalidate_bh_lru
* Struck through repros no longer work on HEAD.