syzbot


KCSAN: data-race in __xa_set_mark / xas_find_marked

Status: moderation: reported on 2020/09/25 08:57
Subsystems: fs mm
[Documentation on labels]
Reported-by: syzbot+f512479ce46e8f0a9370@syzkaller.appspotmail.com
First crash: 1399d, last: 1d13h

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

read-write to 0xffff888106e3c900 of 8 bytes by task 9713 on cpu 1:
 instrument_read_write include/linux/instrumented.h:55 [inline]
 __instrument_read_write_bitop include/asm-generic/bitops/instrumented-non-atomic.h:84 [inline]
 ___test_and_set_bit include/asm-generic/bitops/instrumented-non-atomic.h:99 [inline]
 node_set_mark lib/xarray.c:95 [inline]
 xas_set_mark lib/xarray.c:885 [inline]
 __xa_set_mark+0xdb/0x1b0 lib/xarray.c:1910
 __folio_mark_dirty+0x3c3/0x4e0 mm/page-writeback.c:2724
 mark_buffer_dirty+0x148/0x250 fs/buffer.c:1200
 __block_commit_write fs/buffer.c:2177 [inline]
 block_write_end+0x158/0x2e0 fs/buffer.c:2253
 ext4_da_do_write_end fs/ext4/inode.c:2955 [inline]
 ext4_da_write_end+0x1ad/0x860 fs/ext4/inode.c:3028
 generic_perform_write+0x276/0x410 mm/filemap.c:3985
 ext4_buffered_write_iter+0x1f6/0x380 fs/ext4/file.c:299
 ext4_file_write_iter+0x29f/0xe30
 call_write_iter include/linux/fs.h:2110 [inline]
 new_sync_write fs/read_write.c:497 [inline]
 vfs_write+0x771/0x8e0 fs/read_write.c:590
 ksys_write+0xeb/0x1b0 fs/read_write.c:643
 __do_sys_write fs/read_write.c:655 [inline]
 __se_sys_write fs/read_write.c:652 [inline]
 __x64_sys_write+0x42/0x50 fs/read_write.c:652
 x64_sys_call+0x27b7/0x2d30 arch/x86/include/generated/asm/syscalls_64.h:2
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0xcd/0x1d0 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

read to 0xffff888106e3c900 of 8 bytes by task 10 on cpu 0:
 xas_find_chunk include/linux/xarray.h:1723 [inline]
 xas_find_marked+0x216/0x660 lib/xarray.c:1354
 find_get_entry+0x5d/0x290 mm/filemap.c:1968
 filemap_get_folios_tag+0x136/0x210 mm/filemap.c:2218
 mpage_prepare_extent_to_map+0x329/0xb80 fs/ext4/inode.c:2392
 ext4_do_writepages+0xa20/0x2110 fs/ext4/inode.c:2677
 ext4_writepages+0x159/0x2e0 fs/ext4/inode.c:2768
 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_start_all fs/fs-writeback.c:2245 [inline]
 wb_do_writeback fs/fs-writeback.c:2271 [inline]
 wb_workfn+0x4ea/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

value changed: 0x03ffffffffffffff -> 0x0fffffffffffffff

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 PID: 10 Comm: kworker/u8:0 Not tainted 6.9.0-rc4-syzkaller-00113-g2668e3ae2ef3 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/27/2024
Workqueue: writeback wb_workfn (flush-8:0)
==================================================================

Crashes (1326):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/04/19 06:05 upstream 2668e3ae2ef3 af24b050 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __xa_set_mark / xas_find_marked
2024/04/17 16:36 upstream 96fca68c4fbf acc528cb .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __xa_set_mark / xas_find_marked
2024/04/16 20:03 upstream 96fca68c4fbf 18f6e127 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __xa_set_mark / xas_find_marked
2024/04/16 08:47 upstream 96fca68c4fbf 0d592ce4 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __xa_set_mark / xas_find_marked
2024/04/15 16:00 upstream 0bbac3facb5d b9af7e61 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __xa_set_mark / xas_find_marked
2024/04/14 15:53 upstream 7efd0a74039f c8349e48 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __xa_set_mark / xas_find_marked
2024/04/13 05:12 upstream 5939d45155bb c8349e48 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __xa_set_mark / xas_find_marked
2024/04/12 05:47 upstream 586b5dfb51b9 27de0a5c .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __xa_set_mark / xas_find_marked
2024/04/11 09:25 upstream 9875c0beb8ad 33b9e058 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __xa_set_mark / xas_find_marked
2024/04/10 11:16 upstream 2c71fdf02a95 171ec371 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __xa_set_mark / xas_find_marked
2024/04/09 20:48 upstream 20cb38a7af88 171ec371 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __xa_set_mark / xas_find_marked
2024/04/08 23:01 upstream fec50db7033e 53df08b6 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __xa_set_mark / xas_find_marked
2024/04/04 18:14 upstream c85af715cac0 0ee3535e .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __xa_set_mark / xas_find_marked
2024/04/03 10:44 upstream b1e6ec0a0fd0 7925100d .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __xa_set_mark / xas_find_marked
2024/04/02 18:38 upstream 026e680b0a08 eb2966c4 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __xa_set_mark / xas_find_marked
2024/04/01 20:15 upstream 39cd87c4eb2b 6baf5069 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __xa_set_mark / xas_find_marked
2024/03/31 08:20 upstream 712e14250dd2 6baf5069 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __xa_set_mark / xas_find_marked
2024/03/31 02:48 upstream 486291a0e624 6baf5069 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __xa_set_mark / xas_find_marked
2024/03/30 05:21 upstream 4535e1a4174c 6baf5069 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __xa_set_mark / xas_find_marked
2024/03/29 22:53 upstream 4535e1a4174c c52bcb23 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __xa_set_mark / xas_find_marked
2024/03/29 19:36 upstream 317c7bc0ef03 c52bcb23 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __xa_set_mark / xas_find_marked
2024/03/28 20:15 upstream 8d025e2092e2 e91187ee .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __xa_set_mark / xas_find_marked
2024/03/28 08:54 upstream 8d025e2092e2 120789fd .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __xa_set_mark / xas_find_marked
2024/03/27 23:32 upstream 498e47cd1d1f 120789fd .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __xa_set_mark / xas_find_marked
2024/03/27 02:16 upstream 7033999ecd7b 454571b6 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __xa_set_mark / xas_find_marked
2024/03/26 20:49 upstream 928a87efa423 454571b6 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __xa_set_mark / xas_find_marked
2024/03/26 02:58 upstream 928a87efa423 bcd9b39f .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __xa_set_mark / xas_find_marked
2024/03/25 20:43 upstream 4cece7649650 0ea90952 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __xa_set_mark / xas_find_marked
2024/03/24 13:36 upstream 70293240c5ce 0ea90952 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __xa_set_mark / xas_find_marked
2024/03/23 19:38 upstream 484193fecd2b 0ea90952 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __xa_set_mark / xas_find_marked
2024/03/22 13:58 upstream 8e938e398669 4b6cdce6 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __xa_set_mark / xas_find_marked
2024/03/22 01:59 upstream ebc9bee8814d 7a239ce7 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __xa_set_mark / xas_find_marked
2024/03/21 13:45 upstream dba89d1b81df 6753db5c .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __xa_set_mark / xas_find_marked
2024/03/18 23:41 upstream f6cef5f8c37f baa80228 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __xa_set_mark / xas_find_marked
2024/03/15 03:16 upstream fe46a7dd189e d615901c .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __xa_set_mark / xas_find_marked
2024/03/13 18:00 upstream 61387b8dcf1d f919f202 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __xa_set_mark / xas_find_marked
2024/03/12 20:25 upstream 855684c7d938 c35c26ec .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __xa_set_mark / xas_find_marked
2024/03/12 06:37 upstream 045395d86acd 6ee49f2e .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __xa_set_mark / xas_find_marked
2024/03/11 20:51 upstream e8f897f4afef 6ee49f2e .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __xa_set_mark / xas_find_marked
2024/03/11 05:20 upstream fa4b851b4ad6 6ee49f2e .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __xa_set_mark / xas_find_marked
2024/03/10 01:35 upstream 09e5c48fea17 6ee49f2e .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __xa_set_mark / xas_find_marked
2024/03/09 05:13 upstream 10d48d70e82d 6ee49f2e .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __xa_set_mark / xas_find_marked
2024/03/08 03:16 upstream 3aaa8ce7a335 cf82cde1 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __xa_set_mark / xas_find_marked
2024/03/07 01:45 upstream 67be068d31d4 f39a7eed .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __xa_set_mark / xas_find_marked
2024/03/06 11:48 upstream 5847c9777c30 f39a7eed .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __xa_set_mark / xas_find_marked
2024/03/05 22:49 upstream 29cd507cbec2 f39a7eed .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __xa_set_mark / xas_find_marked
2024/03/05 01:25 upstream 90d35da658da 5fc53669 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __xa_set_mark / xas_find_marked
2021/01/17 11:08 upstream 0da0a8a0a0e1 813be542 .config console log report info ci2-upstream-kcsan-gce
2020/09/24 17:40 upstream 171d4ff79f96 54289b08 .config console log report info ci2-upstream-kcsan-gce
2020/06/21 17:45 upstream 64677779e896 4f2acff9 .config console log report ci2-upstream-kcsan-gce
* Struck through repros no longer work on HEAD.