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: 281d, last: 33d
Similar bugs (11)
Kernel Title Rank 🛈 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 6 5 1452d 1522d 0/29 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 6 5 1111d 1146d 0/29 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 6 11 1770d 1881d 0/29 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 6 101 613d 632d 0/29 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 6 2 1680d 1713d 0/29 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 6 38 319d 448d 0/29 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 6 1 505d 505d 0/29 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 6 2 544d 559d 0/29 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 6 1218d 1267d 0/29 auto-closed as invalid on 2022/06/04 23:25
upstream KCSAN: data-race in mark_buffer_dirty_inode / mark_buffer_dirty_inode exfat 6 1 1912d 1912d 0/29 closed as invalid on 2020/06/18 14:13
upstream KCSAN: data-race in mark_buffer_dirty_inode / mark_buffer_dirty_inode (4) exfat 6 8 1560d 1597d 0/29 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 0xffff888106b0b608 of 8 bytes by task 4784 on cpu 0:
 mark_buffer_dirty_inode+0x18c/0x1c0 fs/buffer.c:693
 fat_mirror_bhs+0x234/0x320 fs/fat/fatent.c:398
 fat_alloc_clusters+0x98b/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+0x258/0x5e0 fs/fat/inode.c:189
 __block_write_begin_int+0x400/0xf90 fs/buffer.c:2151
 block_write_begin fs/buffer.c:2262 [inline]
 cont_write_begin+0x5fc/0x970 fs/buffer.c:2601
 fat_write_begin+0x4f/0xe0 fs/fat/inode.c:228
 cont_expand_zero fs/buffer.c:2528 [inline]
 cont_write_begin+0x1b0/0x970 fs/buffer.c:2591
 fat_write_begin+0x4f/0xe0 fs/fat/inode.c:228
 generic_cont_expand_simple+0xad/0x150 fs/buffer.c:2492
 fat_cont_expand+0x3e/0x170 fs/fat/file.c:223
 fat_setattr+0x2a5/0x8a0 fs/fat/file.c:513
 notify_change+0x809/0x890 fs/attr.c:552
 do_truncate fs/open.c:68 [inline]
 do_ftruncate+0x34b/0x450 fs/open.c:195
 do_sys_ftruncate fs/open.c:210 [inline]
 __do_sys_ftruncate fs/open.c:215 [inline]
 __se_sys_ftruncate fs/open.c:213 [inline]
 __x64_sys_ftruncate+0x68/0xc0 fs/open.c:213
 x64_sys_call+0xd65/0x2fb0 arch/x86/include/generated/asm/syscalls_64.h:78
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0xd2/0x200 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

read to 0xffff888106b0b608 of 8 bytes by task 4791 on cpu 1:
 mark_buffer_dirty_inode+0x95/0x1c0 fs/buffer.c:689
 fat_mirror_bhs+0x234/0x320 fs/fat/fatent.c:398
 fat_alloc_clusters+0x98b/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+0x258/0x5e0 fs/fat/inode.c:189
 __block_write_begin_int+0x400/0xf90 fs/buffer.c:2151
 block_write_begin fs/buffer.c:2262 [inline]
 cont_write_begin+0x5fc/0x970 fs/buffer.c:2601
 fat_write_begin+0x4f/0xe0 fs/fat/inode.c:228
 cont_expand_zero fs/buffer.c:2561 [inline]
 cont_write_begin+0x671/0x970 fs/buffer.c:2591
 fat_write_begin+0x4f/0xe0 fs/fat/inode.c:228
 generic_perform_write+0x184/0x490 mm/filemap.c:4112
 __generic_file_write_iter+0x9e/0x120 mm/filemap.c:4229
 generic_file_write_iter+0x8d/0x2f0 mm/filemap.c:4255
 do_iter_readv_writev+0x421/0x4c0 fs/read_write.c:-1
 vfs_writev+0x2df/0x8b0 fs/read_write.c:1057
 do_pwritev fs/read_write.c:1153 [inline]
 __do_sys_pwritev2 fs/read_write.c:1211 [inline]
 __se_sys_pwritev2+0xfc/0x1c0 fs/read_write.c:1202
 __x64_sys_pwritev2+0x67/0x80 fs/read_write.c:1202
 x64_sys_call+0x1cea/0x2fb0 arch/x86/include/generated/asm/syscalls_64.h:329
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0xd2/0x200 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

value changed: 0x0000000000000000 -> 0xffff88810b8cfb08

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 UID: 0 PID: 4791 Comm: syz.4.444 Not tainted 6.16.0-syzkaller #0 PREEMPT(voluntary) 
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/2025
==================================================================
syz.4.444 (4791) used greatest stack depth: 9992 bytes left

Crashes (25):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/07/29 00:10 upstream 038d61fd6422 6654ea9c .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
2025/07/26 22:01 upstream 302f88ff3584 fb8f743d .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
2025/06/16 18:12 upstream e04c78d86a96 d1716036 .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
2025/06/15 10:51 upstream 8c6bc74c7f89 5f4b362d .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
2025/05/26 23:25 upstream 0ff41df1cb26 874a1386 .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
2025/05/10 22:06 upstream bec6f00f120e 77908e5f .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
2025/05/08 18:13 upstream d76bb1ebb558 dbf35fa1 .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
2025/05/08 04:01 upstream 707df3375124 dbf35fa1 .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
2025/04/30 01:42 upstream ca91b9500108 85a5a23f .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
2025/04/19 08:06 upstream 3088d26962e8 2a20f901 .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
2025/03/19 07:56 upstream 81e4f8d68c66 8d0a2921 .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
2025/03/05 04:34 upstream 48a5eed9ad58 c3901742 .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
2025/01/17 17:31 upstream 9bffa1ad25b8 953d1c45 .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
2025/01/17 17:29 upstream 9bffa1ad25b8 953d1c45 .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
2025/01/17 17:27 upstream 9bffa1ad25b8 953d1c45 .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
2025/01/17 17:27 upstream 9bffa1ad25b8 953d1c45 .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
2025/01/17 00:29 upstream ce69b4019001 f9e07a6e .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
2025/01/16 17:24 upstream 619f0b6fad52 f9e07a6e .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
2025/01/16 17:20 upstream 619f0b6fad52 f9e07a6e .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
2025/01/16 17:20 upstream 619f0b6fad52 f9e07a6e .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
2024/12/27 06:45 upstream d6ef8b40d075 d3ccff63 .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
2024/12/26 08:34 upstream 9b2ffa6148b1 444551c4 .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
2024/12/19 23:27 upstream baaa2567a712 5905cb39 .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
2024/12/18 06:49 upstream 59dbb9d81adf a0626d3a .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
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.