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: 1d17h, last: 1d17h
Similar bugs (7)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in has_bh_in_lru / invalidate_bh_lru (4) ext4 80 413d 557d 0/28 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 1 850d 850d 0/28 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 13 239d 356d 0/28 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 14 1958d 2025d 0/28 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 213 894d 1354d 0/28 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 1 201d 201d 0/28 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 63d 136d 0/28 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 11183 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
 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:1753
 ext4_kill_sb+0x42/0x80 fs/ext4/super.c:7391
 deactivate_locked_super+0x72/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+0x12e/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

read to 0xffff888237c26f10 of 8 bytes by task 11401 on cpu 1:
 has_bh_in_lru+0x35/0x1f0 fs/buffer.c:1557
 smp_call_function_many_cond+0x389/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
 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+0x298/0x650 fs/file_table.c:465
 ____fput+0x1c/0x30 fs/file_table.c:493
 task_work_run+0x12e/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: 0xffff88811a0ca3a8 -> 0x0000000000000000

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

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