syzbot


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

Status: moderation: reported on 2024/11/27 20:51
Subsystems: ext4
[Documentation on labels]
Reported-by: syzbot+80bd9e218b2e56fdf6ed@syzkaller.appspotmail.com
First crash: 23d, last: 23d
Similar bugs (5)
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 235d 380d 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 672d 672d 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 62d 178d 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 1780d 1847d 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 716d 1176d 0/28 auto-obsoleted due to no activity on 2023/02/08 20:39

Sample crash report:
netlink: 28 bytes leftover after parsing attributes in process `syz.9.2011'.
loop9: detected capacity change from 0 to 256
==================================================================
BUG: KCSAN: data-race in has_bh_in_lru / invalidate_bh_lru

write to 0xffff888237d2ba28 of 8 bytes by task 12727 on cpu 1:
 __invalidate_bh_lrus fs/buffer.c:1499 [inline]
 invalidate_bh_lru+0x8b/0xf0 fs/buffer.c:1511
 csd_do_func kernel/smp.c:134 [inline]
 smp_call_function_many_cond+0x690/0xc20 kernel/smp.c:875
 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
 invalidate_bdev+0x42/0x70 block/bdev.c:100
 __ext4_fill_super fs/ext4/super.c:5708 [inline]
 ext4_fill_super+0x6f3/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

read to 0xffff888237d2ba28 of 8 bytes by task 12736 on cpu 0:
 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
 fat_fill_super+0x99d/0x1bf0 fs/fat/inode.c:1629
 vfat_fill_super+0x24/0x30 fs/fat/namei_vfat.c:1200
 get_tree_bdev_flags+0x29f/0x310 fs/super.c:1636
 get_tree_bdev+0x1f/0x30 fs/super.c:1659
 vfat_get_tree+0x1c/0x30 fs/fat/namei_vfat.c:1205
 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: 0xffff88810447f138 -> 0x0000000000000000

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 UID: 0 PID: 12736 Comm: syz.9.2011 Not tainted 6.12.0-syzkaller-10313-g7d4050728c83 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024
==================================================================
FAT-fs (loop9): Directory bread(block 64) failed
FAT-fs (loop9): Directory bread(block 65) failed
FAT-fs (loop9): Directory bread(block 66) failed
FAT-fs (loop9): Directory bread(block 67) failed
FAT-fs (loop9): Directory bread(block 68) failed
FAT-fs (loop9): Directory bread(block 69) failed
FAT-fs (loop9): Directory bread(block 70) failed
FAT-fs (loop9): Directory bread(block 71) failed
FAT-fs (loop9): Directory bread(block 72) failed
FAT-fs (loop9): Directory bread(block 73) failed

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/11/27 20:50 upstream 7d4050728c83 5df23865 .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.