syzbot


KCSAN: data-race in __xa_set_mark / xas_find_marked

Status: moderation: reported on 2020/09/25 08:57
Reported-by: syzbot+f512479ce46e8f0a9370@syzkaller.appspotmail.com
First crash: 954d, last: 1d02h

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

read-write to 0xffff88812ba5a8e8 of 8 bytes by task 11963 on cpu 1:
 instrument_read_write include/linux/instrumented.h:58 [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:93 [inline]
 xas_set_mark lib/xarray.c:887 [inline]
 __xa_set_mark+0xe0/0x1a0 lib/xarray.c:1906
 __folio_mark_dirty+0xfb/0x130 mm/page-writeback.c:2729
 __set_page_dirty include/linux/pagemap.h:1052 [inline]
 mark_buffer_dirty+0x152/0x390 fs/buffer.c:1105
 __block_commit_write+0x11d/0x1c0 fs/buffer.c:2065
 block_write_end fs/buffer.c:2144 [inline]
 generic_write_end+0x81/0x350 fs/buffer.c:2158
 ext4_da_write_end+0x26c/0x620 fs/ext4/inode.c:3175
 generic_perform_write+0x264/0x3f0 mm/filemap.c:3783
 ext4_buffered_write_iter+0x235/0x3e0 fs/ext4/file.c:285
 ext4_file_write_iter+0x2bb/0x11b0
 call_write_iter include/linux/fs.h:2189 [inline]
 new_sync_write fs/read_write.c:491 [inline]
 vfs_write+0x468/0x760 fs/read_write.c:584
 ksys_write+0xe8/0x1a0 fs/read_write.c:637
 __do_sys_write fs/read_write.c:649 [inline]
 __se_sys_write fs/read_write.c:646 [inline]
 __x64_sys_write+0x3e/0x50 fs/read_write.c:646
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x2b/0x70 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x63/0xcd

read to 0xffff88812ba5a8e8 of 8 bytes by task 8046 on cpu 0:
 xas_find_chunk include/linux/xarray.h:1704 [inline]
 xas_find_marked+0x22f/0x6a0 lib/xarray.c:1356
 find_get_entry mm/filemap.c:2006 [inline]
 find_get_pages_range_tag+0x102/0x420 mm/filemap.c:2311
 pagevec_lookup_range_tag+0x37/0x50 mm/swap.c:1126
 mpage_prepare_extent_to_map+0x1be/0xcf0 fs/ext4/inode.c:2618
 ext4_do_writepages+0x6dd/0x1e70 fs/ext4/inode.c:2830
 ext4_writepages+0x11b/0x240 fs/ext4/inode.c:2965
 do_writepages+0x1db/0x350 mm/page-writeback.c:2581
 __writeback_single_inode+0x81/0x590 fs/fs-writeback.c:1598
 writeback_sb_inodes+0x4dd/0xa30 fs/fs-writeback.c:1889
 __writeback_inodes_wb+0xa0/0x1b0 fs/fs-writeback.c:1960
 wb_writeback+0x280/0x650 fs/fs-writeback.c:2065
 wb_check_start_all fs/fs-writeback.c:2187 [inline]
 wb_do_writeback+0x418/0x600 fs/fs-writeback.c:2213
 wb_workfn+0x88/0x260 fs/fs-writeback.c:2246
 process_one_work+0x3d3/0x720 kernel/workqueue.c:2289
 worker_thread+0x618/0xa70 kernel/workqueue.c:2436
 kthread+0x1a9/0x1e0 kernel/kthread.c:376
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:308

value changed: 0x0180000000000000 -> 0x0780000000000000

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 PID: 8046 Comm: kworker/u4:8 Tainted: G        W          6.2.0-rc6-syzkaller-00003-g22b8077d0fce-dirty #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/12/2023
Workqueue: writeback wb_workfn (flush-8:0)
==================================================================

Crashes (748):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets Title
ci2-upstream-kcsan-gce 2023/01/31 15:14 upstream 22b8077d0fce b68fb8d6 .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in __xa_set_mark / xas_find_marked
ci2-upstream-kcsan-gce 2023/01/30 15:32 upstream 6d796c50f84c b68fb8d6 .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in __xa_set_mark / xas_find_marked
ci2-upstream-kcsan-gce 2023/01/28 01:25 upstream 83abd4d4c4be 9dfcf09c .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in __xa_set_mark / xas_find_marked
ci2-upstream-kcsan-gce 2023/01/25 12:36 upstream 948ef7bb70c4 9dfcf09c .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in __xa_set_mark / xas_find_marked
ci2-upstream-kcsan-gce 2023/01/23 08:08 upstream 2475bf0250de 44388686 .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in __xa_set_mark / xas_find_marked
ci2-upstream-kcsan-gce 2023/01/22 22:36 upstream 2475bf0250de cc0f9968 .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in __xa_set_mark / xas_find_marked
ci2-upstream-kcsan-gce 2023/01/21 16:06 upstream f883675bf652 cc0f9968 .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in __xa_set_mark / xas_find_marked
ci2-upstream-kcsan-gce 2023/01/21 07:04 upstream edc00350d205 cc0f9968 .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in __xa_set_mark / xas_find_marked
ci2-upstream-kcsan-gce 2023/01/19 21:59 upstream 081edded9b38 71197f3a .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in __xa_set_mark / xas_find_marked
ci2-upstream-kcsan-gce 2023/01/18 15:34 upstream c1649ec55708 4620c2d9 .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in __xa_set_mark / xas_find_marked
ci2-upstream-kcsan-gce 2023/01/16 05:02 upstream 5dc4c995db9e a63719e7 .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in __xa_set_mark / xas_find_marked
ci2-upstream-kcsan-gce 2023/01/15 07:50 upstream 7c6984405241 a63719e7 .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in __xa_set_mark / xas_find_marked
ci2-upstream-kcsan-gce 2023/01/14 12:37 upstream 97ec4d559d93 a63719e7 .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in __xa_set_mark / xas_find_marked
ci2-upstream-kcsan-gce 2023/01/12 15:06 upstream e8f60cd7db24 96166539 .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in __xa_set_mark / xas_find_marked
ci2-upstream-kcsan-gce 2023/01/11 04:31 upstream 40c18f363a08 48bc529a .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in __xa_set_mark / xas_find_marked
ci2-upstream-kcsan-gce 2023/01/07 20:29 upstream 0a71553536d2 1dac8c7a .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in __xa_set_mark / xas_find_marked
ci2-upstream-kcsan-gce 2023/01/05 22:46 upstream 41c03ba9beea 1dac8c7a .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in __xa_set_mark / xas_find_marked
ci2-upstream-kcsan-gce 2023/01/03 05:59 upstream 69b41ac87e4a ab32d508 .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in __xa_set_mark / xas_find_marked
ci2-upstream-kcsan-gce 2023/01/01 13:08 upstream e4cf7c25bae5 ab32d508 .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in __xa_set_mark / xas_find_marked
ci2-upstream-kcsan-gce 2022/12/30 21:08 upstream bff687b3dad6 ab32d508 .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in __xa_set_mark / xas_find_marked
ci2-upstream-kcsan-gce 2022/12/24 19:16 upstream 72a85e2b0a1e 9da18ae8 .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in __xa_set_mark / xas_find_marked
ci2-upstream-kcsan-gce 2022/12/24 05:19 upstream 51094a24b85e 9da18ae8 .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in __xa_set_mark / xas_find_marked
ci2-upstream-kcsan-gce 2022/12/23 17:04 upstream 8395ae05cb5a 9da18ae8 .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in __xa_set_mark / xas_find_marked
ci2-upstream-kcsan-gce 2022/12/15 10:54 upstream 041fae9c105a 6f9c033e .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in __xa_set_mark / xas_find_marked
ci2-upstream-kcsan-gce 2022/12/14 15:04 upstream e2ca6ba6ba01 b18f0a64 .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in __xa_set_mark / xas_find_marked
ci2-upstream-kcsan-gce 2022/12/13 20:14 upstream 764822972d64 f6511626 .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in __xa_set_mark / xas_find_marked
ci2-upstream-kcsan-gce 2022/12/13 11:33 upstream 9b93f5069fd9 67be1ae7 .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in __xa_set_mark / xas_find_marked
ci2-upstream-kcsan-gce 2022/12/11 21:50 upstream 4cee37b3a4e6 67be1ae7 .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in __xa_set_mark / xas_find_marked
ci2-upstream-kcsan-gce 2022/12/09 16:26 upstream 0d1409e4ff08 67be1ae7 .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in __xa_set_mark / xas_find_marked
ci2-upstream-kcsan-gce 2022/12/08 16:09 upstream 479174d402bc 1034e5fa .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in __xa_set_mark / xas_find_marked
ci2-upstream-kcsan-gce 2022/12/08 04:59 upstream 479174d402bc d88f3abb .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in __xa_set_mark / xas_find_marked
ci2-upstream-kcsan-gce 2022/12/04 07:14 upstream c2bf05db6c78 e080de16 .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in __xa_set_mark / xas_find_marked
ci2-upstream-kcsan-gce 2022/12/02 16:42 upstream a4412fdd49dc e080de16 .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in __xa_set_mark / xas_find_marked
ci2-upstream-kcsan-gce 2022/12/01 21:19 upstream ef4d3ea40565 e080de16 .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in __xa_set_mark / xas_find_marked
ci2-upstream-kcsan-gce 2022/11/30 03:26 upstream 01f856ae6d0c 579a3740 .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in __xa_set_mark / xas_find_marked
ci2-upstream-kcsan-gce 2022/11/29 19:38 upstream ca57f02295f1 579a3740 .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in __xa_set_mark / xas_find_marked
ci2-upstream-kcsan-gce 2022/11/29 07:39 upstream ca57f02295f1 ca9683b8 .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in __xa_set_mark / xas_find_marked
ci2-upstream-kcsan-gce 2022/11/28 13:45 upstream b7b275e60bcd 247de55b .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in __xa_set_mark / xas_find_marked
ci2-upstream-kcsan-gce 2022/11/28 09:31 upstream b7b275e60bcd f4470a7b .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in __xa_set_mark / xas_find_marked
ci2-upstream-kcsan-gce 2022/11/26 16:59 upstream 644e9524388a f4470a7b .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in __xa_set_mark / xas_find_marked
ci2-upstream-kcsan-gce 2022/11/25 21:36 upstream 08ad43d554ba f4470a7b .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in __xa_set_mark / xas_find_marked
ci2-upstream-kcsan-gce 2022/11/25 03:50 upstream c3eb11fbb826 74a66371 .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in __xa_set_mark / xas_find_marked
ci2-upstream-kcsan-gce 2022/11/23 12:44 upstream eb7081409f94 52fdf57a .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in __xa_set_mark / xas_find_marked
ci2-upstream-kcsan-gce 2022/11/22 17:06 upstream eb7081409f94 9da37ae8 .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in __xa_set_mark / xas_find_marked
ci2-upstream-kcsan-gce 2022/11/21 04:57 upstream eb7081409f94 5bb70014 .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in __xa_set_mark / xas_find_marked
ci2-upstream-kcsan-gce 2022/11/17 12:00 upstream cc675d22e422 3a127a31 .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in __xa_set_mark / xas_find_marked
ci2-upstream-kcsan-gce 2022/11/16 20:51 upstream 59d0d52c30d4 3a127a31 .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in __xa_set_mark / xas_find_marked
ci2-upstream-kcsan-gce 2022/11/15 02:58 upstream e01d50cbd6ee 97de9cfc .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in __xa_set_mark / xas_find_marked
ci2-upstream-kcsan-gce 2022/11/14 08:45 upstream 094226ad94f4 7ba4d859 .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in __xa_set_mark / xas_find_marked
ci2-upstream-kcsan-gce 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
* Struck through repros no longer work on HEAD.