syzbot


KCSAN: data-race in mark_buffer_dirty_inode / mark_buffer_dirty_inode (12)

Status: moderation: reported on 2024/11/23 03:23
Subsystems: exfat
[Documentation on labels]
Reported-by: syzbot+8f246f638e910767fc8a@syzkaller.appspotmail.com
First crash: 7h39m, last: 7h39m
Similar bugs (11)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in mark_buffer_dirty_inode / mark_buffer_dirty_inode (5) exfat 5 1171d 1241d 0/28 auto-closed as invalid on 2021/10/13 19:55
upstream KCSAN: data-race in mark_buffer_dirty_inode / mark_buffer_dirty_inode (7) exfat 5 830d 865d 0/28 auto-closed as invalid on 2022/09/20 02:49
upstream KCSAN: data-race in mark_buffer_dirty_inode / mark_buffer_dirty_inode (2) exfat 11 1488d 1599d 0/28 auto-closed as invalid on 2020/11/30 13:39
upstream KCSAN: data-race in mark_buffer_dirty_inode / mark_buffer_dirty_inode (8) exfat 101 332d 351d 0/28 auto-obsoleted due to no activity on 2024/01/31 07:12
upstream KCSAN: data-race in mark_buffer_dirty_inode / mark_buffer_dirty_inode (3) exfat 2 1399d 1432d 0/28 auto-closed as invalid on 2021/02/27 21:17
upstream KCSAN: data-race in mark_buffer_dirty_inode / mark_buffer_dirty_inode (11) exfat 38 38d 167d 0/28 auto-obsoleted due to no activity on 2024/11/20 06:37
upstream KCSAN: data-race in mark_buffer_dirty_inode / mark_buffer_dirty_inode (10) exfat 1 224d 224d 0/28 auto-obsoleted due to no activity on 2024/05/18 09:53
upstream KCSAN: data-race in mark_buffer_dirty_inode / mark_buffer_dirty_inode (9) exfat 2 262d 278d 0/28 auto-obsoleted due to no activity on 2024/04/09 13:34
upstream KCSAN: data-race in mark_buffer_dirty_inode / mark_buffer_dirty_inode (6) exfat 6 937d 986d 0/28 auto-closed as invalid on 2022/06/04 23:25
upstream KCSAN: data-race in mark_buffer_dirty_inode / mark_buffer_dirty_inode exfat 1 1631d 1631d 0/28 closed as invalid on 2020/06/18 14:13
upstream KCSAN: data-race in mark_buffer_dirty_inode / mark_buffer_dirty_inode (4) exfat 8 1278d 1316d 0/28 auto-closed as invalid on 2021/06/28 13:09

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

write to 0xffff888149428400 of 8 bytes by task 18248 on cpu 0:
 mark_buffer_dirty_inode+0x18d/0x1c0 fs/buffer.c:682
 fat_mirror_bhs+0x241/0x330 fs/fat/fatent.c:398
 fat_alloc_clusters+0x994/0xa80 fs/fat/fatent.c:543
 fat_add_cluster fs/fat/inode.c:107 [inline]
 __fat_get_block fs/fat/inode.c:154 [inline]
 fat_get_block+0x25c/0x5e0 fs/fat/inode.c:189
 __block_write_begin_int+0x417/0xfa0 fs/buffer.c:2121
 block_write_begin fs/buffer.c:2231 [inline]
 cont_write_begin+0x546/0x860 fs/buffer.c:2582
 fat_write_begin+0x51/0xe0 fs/fat/inode.c:228
 generic_perform_write+0x1a8/0x4a0 mm/filemap.c:4056
 __generic_file_write_iter+0xa1/0x120 mm/filemap.c:4157
 generic_file_write_iter+0x77/0x1c0 mm/filemap.c:4183
 new_sync_write fs/read_write.c:586 [inline]
 vfs_write+0x77f/0x920 fs/read_write.c:679
 ksys_write+0xe8/0x1b0 fs/read_write.c:731
 __do_sys_write fs/read_write.c:742 [inline]
 __se_sys_write fs/read_write.c:739 [inline]
 __x64_sys_write+0x42/0x50 fs/read_write.c:739
 x64_sys_call+0x287e/0x2dc0 arch/x86/include/generated/asm/syscalls_64.h:2
 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 0xffff888149428400 of 8 bytes by task 18229 on cpu 1:
 mark_buffer_dirty_inode+0x96/0x1c0 fs/buffer.c:678
 fat_mirror_bhs+0x241/0x330 fs/fat/fatent.c:398
 fat_alloc_clusters+0x994/0xa80 fs/fat/fatent.c:543
 fat_add_cluster fs/fat/inode.c:107 [inline]
 __fat_get_block fs/fat/inode.c:154 [inline]
 fat_get_block+0x25c/0x5e0 fs/fat/inode.c:189
 __block_write_begin_int+0x417/0xfa0 fs/buffer.c:2121
 block_write_begin fs/buffer.c:2231 [inline]
 cont_write_begin+0x546/0x860 fs/buffer.c:2582
 fat_write_begin+0x51/0xe0 fs/fat/inode.c:228
 cont_expand_zero fs/buffer.c:2509 [inline]
 cont_write_begin+0x18b/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_fallocate+0x17c/0x1d0 fs/fat/file.c:301
 vfs_fallocate+0x368/0x3b0 fs/open.c:327
 ksys_fallocate fs/open.c:351 [inline]
 __do_sys_fallocate fs/open.c:356 [inline]
 __se_sys_fallocate fs/open.c:354 [inline]
 __x64_sys_fallocate+0x78/0xc0 fs/open.c:354
 x64_sys_call+0x43c/0x2dc0 arch/x86/include/generated/asm/syscalls_64.h:286
 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: 0x0000000000000000 -> 0xffff888106774e08

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 UID: 0 PID: 18229 Comm: syz.7.4938 Not tainted 6.12.0-syzkaller-07834-g06afb0f36106 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024
==================================================================

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/11/23 03:22 upstream 06afb0f36106 68da6d95 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in mark_buffer_dirty_inode / mark_buffer_dirty_inode
* Struck through repros no longer work on HEAD.