syzbot


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

Status: moderation: reported on 2024/06/25 18:23
Subsystems: ext4
[Documentation on labels]
Reported-by: syzbot+fd3d1af0dd39b0e4fed1@syzkaller.appspotmail.com
First crash: 26d, last: 2d04h
Similar bugs (4)
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 83d 227d 0/27 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 519d 519d 0/27 auto-obsoleted due to no activity on 2023/04/01 03:15
upstream KCSAN: data-race in has_bh_in_lru / invalidate_bh_lru fs 14 1628d 1695d 0/27 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 564d 1024d 0/27 auto-obsoleted due to no activity on 2023/02/08 20:39

Sample crash report:
EXT4-fs (loop2): unmounting filesystem 76b65be2-f6da-4727-8c75-0525a5b65a09.
==================================================================
BUG: KCSAN: data-race in has_bh_in_lru / invalidate_bh_lru

write to 0xffff888237d2b950 of 8 bytes by task 3093 on cpu 1:
 __invalidate_bh_lrus fs/buffer.c:1509 [inline]
 invalidate_bh_lru+0x8b/0xf0 fs/buffer.c:1521
 csd_do_func kernel/smp.c:134 [inline]
 smp_call_function_many_cond+0x690/0xc20 kernel/smp.c:847
 on_each_cpu_cond_mask+0x3c/0x90 kernel/smp.c:1023
 on_each_cpu_cond include/linux/smp.h:105 [inline]
 invalidate_bh_lrus+0x2a/0x30 fs/buffer.c:1540
 invalidate_bdev+0x42/0x70 block/bdev.c:99
 ext4_put_super+0x571/0x840 fs/ext4/super.c:1348
 generic_shutdown_super+0xde/0x210 fs/super.c:642
 kill_block_super+0x2a/0x70 fs/super.c:1685
 ext4_kill_sb+0x44/0x80 fs/ext4/super.c:7289
 deactivate_locked_super+0x7d/0x1c0 fs/super.c:473
 deactivate_super+0x9f/0xb0 fs/super.c:506
 cleanup_mnt+0x268/0x2e0 fs/namespace.c:1373
 __cleanup_mnt+0x19/0x20 fs/namespace.c:1380
 task_work_run+0x13a/0x1a0 kernel/task_work.c:222
 resume_user_mode_work include/linux/resume_user_mode.h:50 [inline]
 exit_to_user_mode_loop kernel/entry/common.c:114 [inline]
 exit_to_user_mode_prepare include/linux/entry-common.h:328 [inline]
 __syscall_exit_to_user_mode_work kernel/entry/common.c:207 [inline]
 syscall_exit_to_user_mode+0xbe/0x130 kernel/entry/common.c:218
 do_syscall_64+0xd6/0x1c0 arch/x86/entry/common.c:89
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

read to 0xffff888237d2b950 of 8 bytes by task 3085 on cpu 0:
 has_bh_in_lru+0x35/0x1f0 fs/buffer.c:1531
 smp_call_function_many_cond+0x2d5/0xc20 kernel/smp.c:809
 on_each_cpu_cond_mask+0x3c/0x90 kernel/smp.c:1023
 on_each_cpu_cond include/linux/smp.h:105 [inline]
 invalidate_bh_lrus+0x2a/0x30 fs/buffer.c:1540
 invalidate_bdev+0x42/0x70 block/bdev.c:99
 ext4_put_super+0x571/0x840 fs/ext4/super.c:1348
 generic_shutdown_super+0xde/0x210 fs/super.c:642
 kill_block_super+0x2a/0x70 fs/super.c:1685
 ext4_kill_sb+0x44/0x80 fs/ext4/super.c:7289
 deactivate_locked_super+0x7d/0x1c0 fs/super.c:473
 deactivate_super+0x9f/0xb0 fs/super.c:506
 cleanup_mnt+0x268/0x2e0 fs/namespace.c:1373
 __cleanup_mnt+0x19/0x20 fs/namespace.c:1380
 task_work_run+0x13a/0x1a0 kernel/task_work.c:222
 resume_user_mode_work include/linux/resume_user_mode.h:50 [inline]
 exit_to_user_mode_loop kernel/entry/common.c:114 [inline]
 exit_to_user_mode_prepare include/linux/entry-common.h:328 [inline]
 __syscall_exit_to_user_mode_work kernel/entry/common.c:207 [inline]
 syscall_exit_to_user_mode+0xbe/0x130 kernel/entry/common.c:218
 do_syscall_64+0xd6/0x1c0 arch/x86/entry/common.c:89
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

value changed: 0xffff8881088a7c30 -> 0x0000000000000000

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 PID: 3085 Comm: syz-executor Not tainted 6.10.0-syzkaller-09061-g4305ca0087dd #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/27/2024
==================================================================

Crashes (3):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/07/19 19:27 upstream 4305ca0087dd 890ce4f3 .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
2024/07/12 08:18 upstream 8a18fda0febb eaeb5c15 .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
2024/06/25 18:22 upstream 55027e689933 04bd2a30 .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.