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: 34d, last: 5d15h
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 445d 590d 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 882d 882d 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 272d 388d 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 1990d 2057d 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 926d 1386d 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 233d 233d 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 95d 168d 0/29 auto-obsoleted due to no activity on 2025/06/09 21:46

Sample crash report:
==================================================================
BUG: KCSAN: data-race in has_bh_in_lru / invalidate_bh_lru

write to 0xffff888237c26f10 of 8 bytes by task 3561 on cpu 0:
 __invalidate_bh_lrus fs/buffer.c:1535 [inline]
 invalidate_bh_lru+0x8f/0xf0 fs/buffer.c:1547
 csd_do_func kernel/smp.c:134 [inline]
 smp_call_function_many_cond+0x237/0xbf0 kernel/smp.c:876
 on_each_cpu_cond_mask+0x3c/0x80 kernel/smp.c:1052
 on_each_cpu_cond include/linux/smp.h:105 [inline]
 invalidate_bh_lrus+0x2a/0x30 fs/buffer.c:1566
 kill_bdev block/bdev.c:90 [inline]
 blkdev_flush_mapping+0x9a/0x1a0 block/bdev.c:712
 blkdev_put_whole block/bdev.c:719 [inline]
 bdev_release+0x2bf/0x3d0 block/bdev.c:1144
 blkdev_release+0x15/0x20 block/fops.c:684
 __fput+0x29b/0x650 fs/file_table.c:465
 fput_close_sync+0x6e/0x120 fs/file_table.c:570
 __do_sys_close fs/open.c:1589 [inline]
 __se_sys_close fs/open.c:1574 [inline]
 __x64_sys_close+0x56/0xf0 fs/open.c:1574
 x64_sys_call+0x2747/0x2fb0 arch/x86/include/generated/asm/syscalls_64.h:4
 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

read to 0xffff888237c26f10 of 8 bytes by task 3305 on cpu 1:
 has_bh_in_lru+0x35/0x1f0 fs/buffer.c:1557
 smp_call_function_many_cond+0x38c/0xbf0 kernel/smp.c:838
 on_each_cpu_cond_mask+0x3c/0x80 kernel/smp.c:1052
 on_each_cpu_cond include/linux/smp.h:105 [inline]
 invalidate_bh_lrus+0x2a/0x30 fs/buffer.c:1566
 invalidate_bdev+0x42/0x70 block/bdev.c:100
 ext4_put_super+0x624/0x7d0 fs/ext4/super.c:1339
 generic_shutdown_super+0xe6/0x210 fs/super.c:643
 kill_block_super+0x2a/0x70 fs/super.c:1755
 ext4_kill_sb+0x42/0x80 fs/ext4/super.c:7391
 deactivate_locked_super+0x75/0x1c0 fs/super.c:474
 deactivate_super+0x97/0xa0 fs/super.c:507
 cleanup_mnt+0x269/0x2e0 fs/namespace.c:1417
 __cleanup_mnt+0x19/0x20 fs/namespace.c:1424
 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+0xe4/0x100 kernel/entry/common.c:114
 exit_to_user_mode_prepare include/linux/entry-common.h:330 [inline]
 syscall_exit_to_user_mode_work include/linux/entry-common.h:414 [inline]
 syscall_exit_to_user_mode include/linux/entry-common.h:449 [inline]
 do_syscall_64+0x1d6/0x200 arch/x86/entry/syscall_64.c:100
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

value changed: 0xffff888106de0680 -> 0x0000000000000000

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 UID: 0 PID: 3305 Comm: syz-executor Not tainted 6.16.0-rc5-syzkaller-00276-g5d5d62298b8b #0 PREEMPT(voluntary) 
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/2025
==================================================================

Crashes (2):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
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.