syzbot


KCSAN: data-race in has_bh_in_lru / invalidate_bh_lrus_cpu (13)

Status: moderation: reported on 2024/12/12 12:40
Subsystems: fs
[Documentation on labels]
Reported-by: syzbot+dc19f2afe4f9b493a78d@syzkaller.appspotmail.com
First crash: 9d01h, last: 7d13h
Similar bugs (12)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in has_bh_in_lru / invalidate_bh_lrus_cpu (3) fs 1 800d 800d 0/28 auto-obsoleted due to no activity on 2022/11/16 21:51
upstream KCSAN: data-race in has_bh_in_lru / invalidate_bh_lrus_cpu (5) fs 2 606d 617d 0/28 auto-obsoleted due to no activity on 2023/05/30 05:48
upstream KCSAN: data-race in has_bh_in_lru / invalidate_bh_lrus_cpu (7) ext4 3 432d 459d 0/28 auto-obsoleted due to no activity on 2023/11/20 11:49
upstream KCSAN: data-race in has_bh_in_lru / invalidate_bh_lrus_cpu (9) fs 1 336d 336d 0/28 auto-obsoleted due to no activity on 2024/02/23 17:16
upstream KCSAN: data-race in has_bh_in_lru / invalidate_bh_lrus_cpu (11) exfat 1 110d 110d 0/28 auto-obsoleted due to no activity on 2024/10/07 09:54
upstream KCSAN: data-race in has_bh_in_lru / invalidate_bh_lrus_cpu (6) ext4 1 496d 496d 0/28 auto-obsoleted due to no activity on 2023/09/17 01:43
upstream KCSAN: data-race in has_bh_in_lru / invalidate_bh_lrus_cpu (10) fs 1 252d 252d 0/28 auto-obsoleted due to no activity on 2024/05/17 23:40
upstream KCSAN: data-race in has_bh_in_lru / invalidate_bh_lrus_cpu (2) fs 14 845d 1051d 0/28 auto-closed as invalid on 2022/10/03 06:12
upstream KCSAN: data-race in has_bh_in_lru / invalidate_bh_lrus_cpu (8) ext4 1 387d 375d 0/28 auto-obsoleted due to no activity on 2024/01/04 10:47
upstream KCSAN: data-race in has_bh_in_lru / invalidate_bh_lrus_cpu ext4 137 1123d 1282d 0/28 auto-closed as invalid on 2021/12/28 13:59
upstream KCSAN: data-race in has_bh_in_lru / invalidate_bh_lrus_cpu (12) fs 1 66d 66d 0/28 auto-obsoleted due to no activity on 2024/11/20 10:12
upstream KCSAN: data-race in has_bh_in_lru / invalidate_bh_lrus_cpu (4) ext4 3 711d 762d 0/28 auto-obsoleted due to no activity on 2023/03/11 22:09

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

write to 0xffff888237c2ba28 of 8 bytes by task 8 on cpu 0:
 __invalidate_bh_lrus fs/buffer.c:1499 [inline]
 invalidate_bh_lrus_cpu+0x85/0xc0 fs/buffer.c:1544
 lru_add_and_bh_lrus_drain mm/swap.c:714 [inline]
 lru_add_drain_per_cpu+0x62/0x80 mm/swap.c:733
 process_one_work kernel/workqueue.c:3229 [inline]
 process_scheduled_works+0x483/0x9a0 kernel/workqueue.c:3310
 worker_thread+0x51d/0x6f0 kernel/workqueue.c:3391
 kthread+0x1d1/0x210 kernel/kthread.c:389
 ret_from_fork+0x4b/0x60 arch/x86/kernel/process.c:147
 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244

read to 0xffff888237c2ba28 of 8 bytes by task 25381 on cpu 1:
 has_bh_in_lru+0x35/0x1f0 fs/buffer.c:1521
 smp_call_function_many_cond+0x2d5/0xc20 kernel/smp.c:837
 on_each_cpu_cond_mask+0x3c/0x90 kernel/smp.c:1051
 on_each_cpu_cond include/linux/smp.h:105 [inline]
 invalidate_bh_lrus+0x2a/0x30 fs/buffer.c:1530
 kill_bdev block/bdev.c:90 [inline]
 set_blocksize+0x24c/0x270 block/bdev.c:173
 sb_set_blocksize+0x2c/0xb0 block/bdev.c:182
 ext4_load_super fs/ext4/super.c:5107 [inline]
 __ext4_fill_super fs/ext4/super.c:5259 [inline]
 ext4_fill_super+0xdca/0x3a10 fs/ext4/super.c:5733
 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:5765
 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+0x2c84/0x2dc0 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: 0xffff888105866270 -> 0x0000000000000000

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 UID: 0 PID: 25381 Comm: syz.0.7785 Not tainted 6.13.0-rc2-syzkaller-00192-g243f750a2df0 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024
==================================================================
EXT4-fs (loop0): mounted filesystem 00000000-0000-0000-0000-000000000000 r/w without journal. Quota mode: none.

Crashes (2):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/12/14 00:11 upstream 243f750a2df0 7cbfbb3a .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in has_bh_in_lru / invalidate_bh_lrus_cpu
2024/12/12 12:39 upstream 231825b2e1ff 6f1b0fa8 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in has_bh_in_lru / invalidate_bh_lrus_cpu
* Struck through repros no longer work on HEAD.