syzbot


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

Status: auto-obsoleted due to no activity on 2024/02/15 01:09
Subsystems: fs mm
[Documentation on labels]
Reported-by: syzbot+9acbe1d6e4f24c951c5b@syzkaller.appspotmail.com
First crash: 278d, last: 189d
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 (5) fs mm 2 116d 148d 0/27 auto-obsoleted due to no activity on 2024/04/28 10:15
upstream KCSAN: data-race in __writeback_single_inode / xas_set_mark ext4 39 1492d 1729d 0/27 closed as invalid on 2020/06/18 14:24
upstream KCSAN: data-race in __writeback_single_inode / xas_set_mark (3) fs mm 115 360d 888d 0/27 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 11 6d11h 72d 0/27 moderation: reported on 2024/05/07 08:53
upstream KCSAN: data-race in __writeback_single_inode / xas_set_mark (2) fs mm 238 939d 1386d 0/27 auto-closed as invalid on 2022/01/26 09:38

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

write to 0xffff888107dabdfc of 4 bytes by task 17353 on cpu 0:
 xa_mark_set lib/xarray.c:71 [inline]
 xas_set_mark+0x131/0x140 lib/xarray.c:892
 __folio_start_writeback+0x1f1/0x450 mm/page-writeback.c:3007
 ext4_bio_write_folio+0x592/0x9a0 fs/ext4/page-io.c:557
 mpage_submit_folio fs/ext4/inode.c:1875 [inline]
 mpage_process_page_bufs+0x488/0x5d0 fs/ext4/inode.c:1988
 mpage_prepare_extent_to_map+0x780/0xb70 fs/ext4/inode.c:2496
 ext4_do_writepages+0xa20/0x2100 fs/ext4/inode.c:2683
 ext4_writepages+0x15e/0x2e0 fs/ext4/inode.c:2774
 do_writepages+0x1c2/0x340 mm/page-writeback.c:2553
 filemap_fdatawrite_wbc+0xdb/0xf0 mm/filemap.c:387
 __filemap_fdatawrite_range mm/filemap.c:420 [inline]
 file_write_and_wait_range+0xf4/0x190 mm/filemap.c:778
 generic_buffers_fsync_noflush+0x4c/0x120 fs/buffer.c:602
 ext4_fsync_nojournal fs/ext4/fsync.c:88 [inline]
 ext4_sync_file+0x206/0x6c0 fs/ext4/fsync.c:151
 vfs_fsync_range+0x111/0x120 fs/sync.c:188
 generic_write_sync include/linux/fs.h:2735 [inline]
 ext4_buffered_write_iter+0x334/0x370 fs/ext4/file.c:305
 ext4_file_write_iter+0x297/0xe10
 call_write_iter include/linux/fs.h:2085 [inline]
 iter_file_splice_write+0x4e0/0x840 fs/splice.c:743
 do_splice_from fs/splice.c:941 [inline]
 direct_splice_actor+0x167/0x2c0 fs/splice.c:1164
 splice_direct_to_actor+0x2fb/0x650 fs/splice.c:1108
 do_splice_direct_actor fs/splice.c:1207 [inline]
 do_splice_direct+0xd7/0x150 fs/splice.c:1233
 do_sendfile+0x377/0x880 fs/read_write.c:1295
 __do_sys_sendfile64 fs/read_write.c:1362 [inline]
 __se_sys_sendfile64 fs/read_write.c:1348 [inline]
 __x64_sys_sendfile64+0x110/0x150 fs/read_write.c:1348
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0x59/0x120 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x63/0x6b

read to 0xffff888107dabdfc of 4 bytes by task 17349 on cpu 1:
 xa_marked include/linux/xarray.h:420 [inline]
 mapping_tagged include/linux/fs.h:507 [inline]
 __writeback_single_inode+0x21d/0x860 fs/fs-writeback.c:1676
 writeback_single_inode+0x12f/0x4a0 fs/fs-writeback.c:1746
 sync_inode_metadata+0x56/0x80 fs/fs-writeback.c:2808
 generic_buffers_fsync_noflush+0xe4/0x120 fs/buffer.c:612
 ext4_fsync_nojournal fs/ext4/fsync.c:88 [inline]
 ext4_sync_file+0x206/0x6c0 fs/ext4/fsync.c:151
 vfs_fsync_range+0x111/0x120 fs/sync.c:188
 generic_write_sync include/linux/fs.h:2735 [inline]
 ext4_buffered_write_iter+0x334/0x370 fs/ext4/file.c:305
 ext4_file_write_iter+0x297/0xe10
 call_write_iter include/linux/fs.h:2085 [inline]
 iter_file_splice_write+0x4e0/0x840 fs/splice.c:743
 do_splice_from fs/splice.c:941 [inline]
 direct_splice_actor+0x167/0x2c0 fs/splice.c:1164
 splice_direct_to_actor+0x2fb/0x650 fs/splice.c:1108
 do_splice_direct_actor fs/splice.c:1207 [inline]
 do_splice_direct+0xd7/0x150 fs/splice.c:1233
 do_sendfile+0x377/0x880 fs/read_write.c:1295
 __do_sys_sendfile64 fs/read_write.c:1362 [inline]
 __se_sys_sendfile64 fs/read_write.c:1348 [inline]
 __x64_sys_sendfile64+0x110/0x150 fs/read_write.c:1348
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0x59/0x120 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x63/0x6b

value changed: 0x14000021 -> 0x08000021

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 17349 Comm: syz-executor.5 Not tainted 6.7.0-syzkaller-01727-gab27740f7665 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/17/2023
==================================================================

Crashes (10):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/01/11 01:08 upstream ab27740f7665 04815ef1 .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/01/10 06:08 upstream 35f11a3710cd b438bd66 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __writeback_single_inode / xas_set_mark
2023/12/29 21:06 upstream 8735c7c84d1b fb427a07 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __writeback_single_inode / xas_set_mark
2023/12/27 04:35 upstream fbafc3e621c3 fb427a07 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __writeback_single_inode / xas_set_mark
2023/12/18 20:47 upstream 2cf4f94d8e86 924661f4 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __writeback_single_inode / xas_set_mark
2023/12/07 06:24 upstream bee0e7762ad2 e3299f55 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __writeback_single_inode / xas_set_mark
2023/11/20 02:27 upstream eb3479bc23fa cb976f63 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __writeback_single_inode / xas_set_mark
2023/11/18 00:11 upstream 6bc40e44f1dd cb976f63 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __writeback_single_inode / xas_set_mark
2023/11/05 03:39 upstream aea6bf908d73 500bfdc4 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __writeback_single_inode / xas_set_mark
2023/10/14 00:45 upstream 10a6e5feccb8 f757a323 .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.