syzbot


KCSAN: data-race in __mark_inode_dirty / redirty_tail_locked (9)

Status: moderation: reported on 2024/10/25 12:29
Subsystems: exfat
[Documentation on labels]
Reported-by: syzbot+c075a29dd4bc54e22f4a@syzkaller.appspotmail.com
First crash: 26d, last: 26d
Similar bugs (8)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in __mark_inode_dirty / redirty_tail_locked (4) ext4 1 351d 349d 0/28 auto-obsoleted due to no activity on 2024/01/09 20:12
upstream KCSAN: data-race in __mark_inode_dirty / redirty_tail_locked (7) ext4 1 164d 164d 0/28 auto-obsoleted due to no activity on 2024/07/15 04:44
upstream KCSAN: data-race in __mark_inode_dirty / redirty_tail_locked (2) ext4 10 454d 589d 0/28 auto-obsoleted due to no activity on 2023/09/29 00:10
upstream KCSAN: data-race in __mark_inode_dirty / redirty_tail_locked (5) ext4 1 295d 295d 0/28 auto-obsoleted due to no activity on 2024/03/05 08:43
upstream KCSAN: data-race in __mark_inode_dirty / redirty_tail_locked (3) ext4 3 389d 415d 0/28 auto-obsoleted due to no activity on 2023/12/02 13:09
upstream KCSAN: data-race in __mark_inode_dirty / redirty_tail_locked (6) ext4 1 235d 235d 0/28 auto-obsoleted due to no activity on 2024/05/04 07:48
upstream KCSAN: data-race in __mark_inode_dirty / redirty_tail_locked (8) exfat 1 105d 105d 0/28 auto-obsoleted due to no activity on 2024/09/11 16:13
upstream KCSAN: data-race in __mark_inode_dirty / redirty_tail_locked ext4 1 657d 657d 0/28 auto-obsoleted due to no activity on 2023/03/31 02:53

Sample crash report:
loop1: detected capacity change from 0 to 8192
FAT-fs (loop1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.
==================================================================
BUG: KCSAN: data-race in __mark_inode_dirty / redirty_tail_locked

read-write to 0xffff88810665f128 of 4 bytes by task 1665 on cpu 0:
 redirty_tail_locked+0x54/0x270 fs/fs-writeback.c:1351
 requeue_inode fs/fs-writeback.c:1616 [inline]
 writeback_sb_inodes+0x6e6/0xa30 fs/fs-writeback.c:1983
 wb_writeback+0x262/0x640 fs/fs-writeback.c:2134
 wb_do_writeback fs/fs-writeback.c:2281 [inline]
 wb_workfn+0x1a8/0x940 fs/fs-writeback.c:2321
 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 0xffff88810665f128 of 4 bytes by task 4567 on cpu 1:
 __mark_inode_dirty+0x198/0x7e0 fs/fs-writeback.c:2515
 mark_inode_dirty include/linux/fs.h:2474 [inline]
 generic_write_end+0x137/0x160 fs/buffer.c:2310
 fat_write_end+0x4e/0x160 fs/fat/inode.c:242
 cont_expand_zero fs/buffer.c:2514 [inline]
 cont_write_begin+0x350/0x860 fs/buffer.c:2572
 fat_write_begin+0x51/0xe0 fs/fat/inode.c:228
 generic_cont_expand_simple+0xaa/0x150 fs/buffer.c:2473
 fat_cont_expand+0x3a/0x160 fs/fat/file.c:223
 fat_setattr+0x2aa/0x840 fs/fat/file.c:513
 notify_change+0x85c/0x8e0 fs/attr.c:503
 do_truncate fs/open.c:65 [inline]
 do_ftruncate+0x3cf/0x460 fs/open.c:181
 do_sys_ftruncate fs/open.c:199 [inline]
 __do_sys_ftruncate fs/open.c:207 [inline]
 __se_sys_ftruncate fs/open.c:205 [inline]
 __x64_sys_ftruncate+0x6a/0xc0 fs/open.c:205
 x64_sys_call+0x8e5/0x2d60 arch/x86/include/generated/asm/syscalls_64.h:78
 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: 0x00010022 -> 0x00000000

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 UID: 0 PID: 4567 Comm: syz.1.495 Not tainted 6.12.0-rc4-syzkaller-00161-gae90f6a6170d #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024
==================================================================
FAT-fs (loop1): error, fat_get_cluster: invalid cluster chain (i_pos 1052)
FAT-fs (loop1): Filesystem has been set read-only
FAT-fs (loop1): error, fat_get_cluster: invalid cluster chain (i_pos 1052)
FAT-fs (loop1): error, fat_get_cluster: invalid cluster chain (i_pos 1052)

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/10/25 12:28 upstream ae90f6a6170d 045e728d .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __mark_inode_dirty / redirty_tail_locked
* Struck through repros no longer work on HEAD.