syzbot


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

Status: moderation: reported on 2024/09/02 09:54
Subsystems: exfat
[Documentation on labels]
Reported-by: syzbot+e73949b0e980f012d37f@syzkaller.appspotmail.com
First crash: 14d, last: 14d
Similar bugs (10)
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 704d 704d 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 510d 522d 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 336d 363d 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 241d 241d 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 (6) ext4 1 400d 400d 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 156d 156d 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 749d 955d 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 291d 279d 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 1028d 1186d 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 (4) ext4 3 615d 666d 0/28 auto-obsoleted due to no activity on 2023/03/11 22:09

Sample crash report:
loop4: detected capacity change from 0 to 256
==================================================================
BUG: KCSAN: data-race in has_bh_in_lru / invalidate_bh_lrus_cpu

write to 0xffff888237d2b910 of 8 bytes by task 35 on cpu 1:
 __invalidate_bh_lrus fs/buffer.c:1509 [inline]
 invalidate_bh_lrus_cpu+0x85/0xc0 fs/buffer.c:1554
 lru_add_and_bh_lrus_drain mm/swap.c:791 [inline]
 lru_add_drain_per_cpu+0x62/0x80 mm/swap.c:810
 process_one_work kernel/workqueue.c:3231 [inline]
 process_scheduled_works+0x483/0x9a0 kernel/workqueue.c:3312
 worker_thread+0x526/0x6e0 kernel/workqueue.c:3389
 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 0xffff888237d2b910 of 8 bytes by task 15817 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
 kill_bdev block/bdev.c:89 [inline]
 set_blocksize+0x25b/0x280 block/bdev.c:172
 sb_set_blocksize+0x2c/0xb0 block/bdev.c:181
 fat_fill_super+0x99d/0x1bf0 fs/fat/inode.c:1630
 msdos_fill_super+0x24/0x30 fs/fat/namei_msdos.c:655
 get_tree_bdev+0x256/0x2e0 fs/super.c:1635
 msdos_get_tree+0x1c/0x30 fs/fat/namei_msdos.c:660
 vfs_get_tree+0x56/0x1e0 fs/super.c:1800
 do_new_mount+0x227/0x690 fs/namespace.c:3472
 path_mount+0x49b/0xb30 fs/namespace.c:3799
 do_mount fs/namespace.c:3812 [inline]
 __do_sys_mount fs/namespace.c:4020 [inline]
 __se_sys_mount+0x27c/0x2d0 fs/namespace.c:3997
 __x64_sys_mount+0x67/0x80 fs/namespace.c:3997
 x64_sys_call+0x203e/0x2d60 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: 0xffff888109146c98 -> 0x0000000000000000

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 UID: 0 PID: 15817 Comm: syz.4.4092 Not tainted 6.11.0-rc6-syzkaller-00017-gc9f016e72b5c #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/06/2024
==================================================================
FAT-fs (loop4): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/09/02 09:53 upstream c9f016e72b5c 1eda0d14 .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.