syzbot


KCSAN: data-race in __writeback_single_inode / xas_set_mark (5)

Status: auto-obsoleted due to no activity on 2024/04/28 10:15
Subsystems: fs mm
[Documentation on labels]
Reported-by: syzbot+99016f42ee1dc331e820@syzkaller.appspotmail.com
First crash: 230d, last: 198d
Similar bugs (5)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in __writeback_single_inode / xas_set_mark ext4 39 1574d 1810d 0/28 closed as invalid on 2020/06/18 14:24
upstream KCSAN: data-race in __writeback_single_inode / xas_set_mark (3) fs mm 115 442d 970d 0/28 auto-obsoleted due to no activity on 2023/08/28 03:40
upstream KCSAN: data-race in __writeback_single_inode / xas_set_mark (6) fs mm 87 7h11m 154d 0/28 moderation: reported on 2024/05/07 08:53
upstream KCSAN: data-race in __writeback_single_inode / xas_set_mark (2) fs mm 238 1021d 1468d 0/28 auto-closed as invalid on 2022/01/26 09:38
upstream KCSAN: data-race in __writeback_single_inode / xas_set_mark (4) fs mm 10 271d 303d 0/28 auto-obsoleted due to no activity on 2024/02/15 01:09

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

write to 0xffff888106676374 of 4 bytes by task 20382 on cpu 1:
 xa_mark_set lib/xarray.c:71 [inline]
 xas_set_mark+0x131/0x150 lib/xarray.c:892
 __folio_start_writeback+0x1f1/0x450 mm/page-writeback.c:3061
 __block_write_full_folio+0x506/0x8d0 fs/buffer.c:1887
 block_write_full_folio+0x293/0x2b0
 __mpage_writepage+0xcfe/0xe10 fs/mpage.c:646
 write_cache_pages+0x62/0x100 mm/page-writeback.c:2569
 mpage_writepages+0x72/0xf0 fs/mpage.c:673
 fat_writepages+0x24/0x30 fs/fat/inode.c:200
 do_writepages+0x1d8/0x480 mm/page-writeback.c:2612
 filemap_fdatawrite_wbc+0xdb/0x100 mm/filemap.c:397
 __filemap_fdatawrite_range mm/filemap.c:430 [inline]
 file_write_and_wait_range+0xc8/0x170 mm/filemap.c:788
 __generic_file_fsync+0x4c/0x140 fs/libfs.c:1473
 fat_file_fsync+0x4c/0x100 fs/fat/file.c:191
 vfs_fsync_range+0x122/0x140 fs/sync.c:188
 generic_write_sync include/linux/fs.h:2793 [inline]
 generic_file_write_iter+0x191/0x1d0 mm/filemap.c:4099
 call_write_iter include/linux/fs.h:2108 [inline]
 iter_file_splice_write+0x5e6/0x970 fs/splice.c:743
 do_splice_from fs/splice.c:941 [inline]
 direct_splice_actor+0x16c/0x2c0 fs/splice.c:1164
 splice_direct_to_actor+0x305/0x670 fs/splice.c:1108
 do_splice_direct_actor fs/splice.c:1207 [inline]
 do_splice_direct+0xd7/0x150 fs/splice.c:1233
 do_sendfile+0x3b9/0x970 fs/read_write.c:1295
 __do_sys_sendfile64 fs/read_write.c:1356 [inline]
 __se_sys_sendfile64 fs/read_write.c:1348 [inline]
 __x64_sys_sendfile64+0xbd/0x150 fs/read_write.c:1348
 do_syscall_64+0xd3/0x1d0
 entry_SYSCALL_64_after_hwframe+0x6d/0x75

read to 0xffff888106676374 of 4 bytes by task 20379 on cpu 0:
 xa_marked include/linux/xarray.h:420 [inline]
 mapping_tagged include/linux/fs.h:498 [inline]
 __writeback_single_inode+0x21d/0x870 fs/fs-writeback.c:1701
 writeback_single_inode+0x12f/0x4a0 fs/fs-writeback.c:1771
 sync_inode_metadata+0x5c/0x90 fs/fs-writeback.c:2833
 __generic_file_fsync+0xf9/0x140 fs/libfs.c:1484
 fat_file_fsync+0x4c/0x100 fs/fat/file.c:191
 vfs_fsync_range+0x122/0x140 fs/sync.c:188
 generic_write_sync include/linux/fs.h:2793 [inline]
 generic_file_write_iter+0x191/0x1d0 mm/filemap.c:4099
 call_write_iter include/linux/fs.h:2108 [inline]
 iter_file_splice_write+0x5e6/0x970 fs/splice.c:743
 do_splice_from fs/splice.c:941 [inline]
 direct_splice_actor+0x16c/0x2c0 fs/splice.c:1164
 splice_direct_to_actor+0x305/0x670 fs/splice.c:1108
 do_splice_direct_actor fs/splice.c:1207 [inline]
 do_splice_direct+0xd7/0x150 fs/splice.c:1233
 do_sendfile+0x3b9/0x970 fs/read_write.c:1295
 __do_sys_sendfile64 fs/read_write.c:1356 [inline]
 __se_sys_sendfile64 fs/read_write.c:1348 [inline]
 __x64_sys_sendfile64+0xbd/0x150 fs/read_write.c:1348
 do_syscall_64+0xd3/0x1d0
 entry_SYSCALL_64_after_hwframe+0x6d/0x75

value changed: 0x05000021 -> 0x02000021

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 PID: 20379 Comm: syz-executor.4 Not tainted 6.8.0-syzkaller-13213-g70293240c5ce #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/29/2024
==================================================================

Crashes (2):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/03/24 10:15 upstream 70293240c5ce 0ea90952 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __writeback_single_inode / xas_set_mark
2024/02/21 02:48 upstream fca7526b7d89 3af7dd65 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __writeback_single_inode / xas_set_mark
* Struck through repros no longer work on HEAD.