syzbot


KCSAN: data-race in filemap_fdatawrite_wbc / xas_set_mark

Status: moderation: reported on 2022/05/10 00:10
Subsystems: fs mm
[Documentation on labels]
Reported-by: syzbot+b97e9f65a69e70c39b6f@syzkaller.appspotmail.com
First crash: 748d, last: 11h34m

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

write to 0xffff888100630b6c of 4 bytes by task 6853 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
 write_cache_pages+0x62/0x100 mm/page-writeback.c:2569
 blkdev_writepages+0x59/0x90 block/fops.c:429
 do_writepages+0x1d8/0x480 mm/page-writeback.c:2612
 __writeback_single_inode+0x91/0x870 fs/fs-writeback.c:1650
 writeback_sb_inodes+0x4de/0xaa0 fs/fs-writeback.c:1941
 __writeback_inodes_wb+0x9a/0x1a0 fs/fs-writeback.c:2012
 wb_writeback+0x264/0x6f0 fs/fs-writeback.c:2119
 wb_check_background_flush fs/fs-writeback.c:2189 [inline]
 wb_do_writeback fs/fs-writeback.c:2277 [inline]
 wb_workfn+0x67f/0x940 fs/fs-writeback.c:2304
 process_one_work kernel/workqueue.c:3254 [inline]
 process_scheduled_works+0x465/0x990 kernel/workqueue.c:3335
 worker_thread+0x526/0x730 kernel/workqueue.c:3416
 kthread+0x1d1/0x210 kernel/kthread.c:388
 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 0xffff888100630b6c of 4 bytes by task 615 on cpu 0:
 xa_marked include/linux/xarray.h:420 [inline]
 mapping_tagged include/linux/fs.h:500 [inline]
 filemap_fdatawrite_wbc+0x5c/0x100 mm/filemap.c:393
 __filemap_fdatawrite_range mm/filemap.c:430 [inline]
 __filemap_fdatawrite mm/filemap.c:436 [inline]
 filemap_flush+0x61/0x90 mm/filemap.c:463
 sync_blockdev_nowait+0x36/0x50 block/bdev.c:195
 sync_filesystem+0xe3/0x190 fs/sync.c:60
 generic_shutdown_super+0x42/0x210 fs/super.c:620
 kill_block_super+0x2a/0x70 fs/super.c:1675
 ext4_kill_sb+0x44/0x80 fs/ext4/super.c:7327
 deactivate_locked_super+0x7d/0x1c0 fs/super.c:472
 deactivate_super+0x9f/0xb0 fs/super.c:505
 cleanup_mnt+0x272/0x2e0 fs/namespace.c:1267
 __cleanup_mnt+0x19/0x20 fs/namespace.c:1274
 task_work_run+0x13a/0x1a0 kernel/task_work.c:180
 resume_user_mode_work include/linux/resume_user_mode.h:50 [inline]
 exit_to_user_mode_loop kernel/entry/common.c:114 [inline]
 exit_to_user_mode_prepare include/linux/entry-common.h:328 [inline]
 __syscall_exit_to_user_mode_work kernel/entry/common.c:207 [inline]
 syscall_exit_to_user_mode+0xbe/0x130 kernel/entry/common.c:218
 do_syscall_64+0xda/0x1d0 arch/x86/entry/common.c:89
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

value changed: 0x01000021 -> 0x02000021

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 PID: 615 Comm: syz-executor.1 Tainted: G        W          6.9.0-rc5-syzkaller-00031-g71b1543c83d6 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/27/2024
==================================================================
EXT4-fs (loop1): unmounting filesystem 00000000-0000-0000-0000-000000000000.

Crashes (657):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/04/23 09:31 upstream 71b1543c83d6 21339d7b .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in filemap_fdatawrite_wbc / xas_set_mark
2024/04/19 17:18 upstream 2668e3ae2ef3 af24b050 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in filemap_fdatawrite_wbc / xas_set_mark
2024/04/17 23:37 upstream 4b6b51322118 acc528cb .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in filemap_fdatawrite_wbc / xas_set_mark
2024/04/14 05:32 upstream 7efd0a74039f c8349e48 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in filemap_fdatawrite_wbc / xas_set_mark
2024/04/06 04:39 upstream 104db052b62d ca620dd8 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in filemap_fdatawrite_wbc / xas_set_mark
2024/04/05 19:55 upstream 8cb4a9a82b21 77230c29 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in filemap_fdatawrite_wbc / xas_set_mark
2024/04/03 02:14 upstream b1e6ec0a0fd0 7925100d .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in filemap_fdatawrite_wbc / xas_set_mark
2024/03/31 08:05 upstream 712e14250dd2 6baf5069 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in filemap_fdatawrite_wbc / xas_set_mark
2024/03/11 11:17 upstream e8f897f4afef 6ee49f2e .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in filemap_fdatawrite_wbc / xas_set_mark
2024/03/08 01:36 upstream 135288b73cef 2b789849 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in filemap_fdatawrite_wbc / xas_set_mark
2024/03/07 01:51 upstream 67be068d31d4 f39a7eed .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in filemap_fdatawrite_wbc / xas_set_mark
2024/03/06 20:43 upstream 5847c9777c30 f39a7eed .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in filemap_fdatawrite_wbc / xas_set_mark
2024/03/06 04:02 upstream 29cd507cbec2 f39a7eed .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in filemap_fdatawrite_wbc / xas_set_mark
2024/03/04 12:04 upstream 90d35da658da 3717835d .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in filemap_fdatawrite_wbc / xas_set_mark
2024/03/02 16:16 upstream 5ad3cb0ed525 25905f5d .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in filemap_fdatawrite_wbc / xas_set_mark
2024/02/29 16:57 upstream 805d849d7c3c 352ab904 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in filemap_fdatawrite_wbc / xas_set_mark
2024/02/28 19:06 upstream e326df53af00 55d6f11d .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in filemap_fdatawrite_wbc / xas_set_mark
2024/02/26 15:36 upstream d206a76d7d27 da36a36b .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in filemap_fdatawrite_wbc / xas_set_mark
2024/02/26 10:23 upstream 70ff1fe626a1 8d446f15 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in filemap_fdatawrite_wbc / xas_set_mark
2024/02/25 08:43 upstream ab0a97cffa0b 8d446f15 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in filemap_fdatawrite_wbc / xas_set_mark
2024/02/22 08:35 upstream 39133352cbed 345111b5 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in filemap_fdatawrite_wbc / xas_set_mark
2024/02/15 00:51 upstream 8d3dea210042 d9b1cdd5 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in filemap_fdatawrite_wbc / xas_set_mark
2024/02/14 05:12 upstream 7e90b5c295ec d902085f .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in filemap_fdatawrite_wbc / xas_set_mark
2024/02/13 22:32 upstream c664e16bb1ba e66542d7 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in filemap_fdatawrite_wbc / xas_set_mark
2024/02/12 17:12 upstream 841c35169323 77b23aa1 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in filemap_fdatawrite_wbc / xas_set_mark
2024/02/09 13:44 upstream 1f719a2f3fa6 7f07e9b0 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in filemap_fdatawrite_wbc / xas_set_mark
2024/02/07 22:57 upstream 547ab8fc4cb0 6404acf9 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in filemap_fdatawrite_wbc / xas_set_mark
2024/02/03 19:45 upstream b555d191561a a67b2c42 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in filemap_fdatawrite_wbc / xas_set_mark
2024/02/03 18:30 upstream b555d191561a a67b2c42 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in filemap_fdatawrite_wbc / xas_set_mark
2024/01/28 13:39 upstream 8a696a29c690 cc4a4020 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in filemap_fdatawrite_wbc / xas_set_mark
2024/01/25 20:35 upstream ecb1b8288dc7 cc4a4020 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in filemap_fdatawrite_wbc / xas_set_mark
2024/01/24 20:25 upstream 443b349019f2 1e153dc8 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in filemap_fdatawrite_wbc / xas_set_mark
2024/01/21 19:50 upstream 7a396820222d 9bd8dcda .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in filemap_fdatawrite_wbc / xas_set_mark
2024/01/17 00:21 upstream 052d534373b7 2a7bcc7f .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in filemap_fdatawrite_wbc / xas_set_mark
2024/01/14 17:59 upstream 052d534373b7 551587c1 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in filemap_fdatawrite_wbc / xas_set_mark
2024/01/11 20:50 upstream 3e7aeb78ab01 00f3cc59 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in filemap_fdatawrite_wbc / xas_set_mark
2024/01/11 05:21 upstream de927f6c0b07 04815ef1 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in filemap_fdatawrite_wbc / xas_set_mark
2024/01/10 19:12 upstream ab27740f7665 04815ef1 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in filemap_fdatawrite_wbc / xas_set_mark
2024/01/09 10:02 upstream 9f8413c4a66f 4c0fd4bb .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in filemap_fdatawrite_wbc / xas_set_mark
2024/01/08 21:01 upstream 5db8752c3b81 4c0fd4bb .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in filemap_fdatawrite_wbc / xas_set_mark
2024/01/07 17:42 upstream 52b1853b080a d0304e9c .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in filemap_fdatawrite_wbc / xas_set_mark
2024/01/06 05:02 upstream a4ab2706bb12 d0304e9c .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in filemap_fdatawrite_wbc / xas_set_mark
2024/01/05 09:40 upstream 1f874787ed9a 28c42cff .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in filemap_fdatawrite_wbc / xas_set_mark
2024/01/05 02:07 upstream 5eff55d725a4 28c42cff .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in filemap_fdatawrite_wbc / xas_set_mark
2024/01/04 06:42 upstream ac865f00af29 28c42cff .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in filemap_fdatawrite_wbc / xas_set_mark
2024/01/01 11:15 upstream 610a9b8f49fb fb427a07 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in filemap_fdatawrite_wbc / xas_set_mark
2023/12/31 20:02 upstream 2639772a11c8 fb427a07 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in filemap_fdatawrite_wbc / xas_set_mark
2023/12/31 17:09 upstream 453f5db0619e fb427a07 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in filemap_fdatawrite_wbc / xas_set_mark
2022/05/09 16:32 upstream 9be9ed2612b5 8b277b8e .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in filemap_fdatawrite_wbc / xas_set_mark
2022/05/08 12:25 upstream 30c8e80f7932 e60b1103 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in filemap_fdatawrite_wbc / xas_set_mark
2022/04/06 11:04 upstream 3e732ebf7316 86b4b7f8 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in filemap_fdatawrite_wbc / xas_set_mark
* Struck through repros no longer work on HEAD.