syzbot


KCSAN: data-race in xas_find_marked / xas_init_marks (2)

Status: moderation: reported on 2021/06/01 09:35
Reported-by: syzbot+a46b57de934a5996888a@syzkaller.appspotmail.com
First crash: 786d, last: 1d17h
similar bugs (1):
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in xas_find_marked / xas_init_marks 11 833d 923d 0/24 auto-closed as invalid on 2020/11/26 04:55

Sample crash report:
loop5: detected capacity change from 0 to 8192
==================================================================
BUG: KCSAN: data-race in xas_find_marked / xas_init_marks

read-write to 0xffff888141ddcfb8 of 8 bytes by task 29856 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_clear_bit include/asm-generic/bitops/instrumented-non-atomic.h:114 [inline]
 node_clear_mark lib/xarray.c:100 [inline]
 xas_clear_mark lib/xarray.c:916 [inline]
 xas_init_marks+0x17e/0x320 lib/xarray.c:949
 xas_store+0x3fd/0xd00 lib/xarray.c:811
 page_cache_delete_batch mm/filemap.c:312 [inline]
 delete_from_page_cache_batch+0x32f/0x770 mm/filemap.c:334
 truncate_inode_pages_range+0x355/0x830 mm/truncate.c:369
 truncate_inode_pages mm/truncate.c:448 [inline]
 truncate_pagecache mm/truncate.c:743 [inline]
 truncate_setsize+0x97/0xc0 mm/truncate.c:768
 fat_setattr+0x8d8/0x9f0 fs/fat/file.c:550
 notify_change+0xa5c/0xad0 fs/attr.c:482
 do_truncate+0xfa/0x140 fs/open.c:65
 handle_truncate fs/namei.c:3216 [inline]
 do_open fs/namei.c:3561 [inline]
 path_openat+0x1840/0x1b60 fs/namei.c:3714
 do_filp_open+0x105/0x220 fs/namei.c:3741
 do_sys_openat2+0xb5/0x2a0 fs/open.c:1310
 do_sys_open fs/open.c:1326 [inline]
 __do_sys_openat fs/open.c:1342 [inline]
 __se_sys_openat fs/open.c:1337 [inline]
 __x64_sys_openat+0xef/0x110 fs/open.c:1337
 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 0xffff888141ddcfb8 of 8 bytes by task 29841 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
 write_cache_pages+0x1fe/0xa30 mm/page-writeback.c:2429
 mpage_writepages+0x6e/0xe0 fs/mpage.c:664
 fat_writepages+0x20/0x30 fs/fat/inode.c:200
 do_writepages+0x1db/0x350 mm/page-writeback.c:2581
 filemap_fdatawrite_wbc+0xd6/0xf0 mm/filemap.c:388
 __filemap_fdatawrite_range mm/filemap.c:421 [inline]
 file_write_and_wait_range+0xf2/0x190 mm/filemap.c:777
 __generic_file_fsync+0x48/0x140 fs/libfs.c:1132
 fat_file_fsync+0x48/0x100 fs/fat/file.c:191
 vfs_fsync_range+0x107/0x120 fs/sync.c:188
 generic_write_sync include/linux/fs.h:2885 [inline]
 generic_file_write_iter+0x18d/0x1c0 mm/filemap.c:3936
 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

value changed: 0xffffffffc0000000 -> 0xffffe00000000000

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 PID: 29841 Comm: syz-executor.5 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
==================================================================

Crashes (541):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets Title
ci2-upstream-kcsan-gce 2023/01/31 22:12 upstream 22b8077d0fce b68fb8d6 .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in xas_find_marked / xas_init_marks
ci2-upstream-kcsan-gce 2023/01/30 16:52 upstream 6d796c50f84c b68fb8d6 .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in xas_find_marked / xas_init_marks
ci2-upstream-kcsan-gce 2023/01/29 20:50 upstream ab072681eabe 9dfcf09c .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in xas_find_marked / xas_init_marks
ci2-upstream-kcsan-gce 2023/01/29 08:57 upstream c96618275234 9dfcf09c .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in xas_find_marked / xas_init_marks
ci2-upstream-kcsan-gce 2023/01/28 13:44 upstream 5af6ce704936 9dfcf09c .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in xas_find_marked / xas_init_marks
ci2-upstream-kcsan-gce 2023/01/26 03:35 upstream 7c46948a6e9c 9dfcf09c .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in xas_find_marked / xas_init_marks
ci2-upstream-kcsan-gce 2023/01/23 14:40 upstream 2475bf0250de 9dfcf09c .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in xas_find_marked / xas_init_marks
ci2-upstream-kcsan-gce 2023/01/23 00:18 upstream 2475bf0250de cc0f9968 .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in xas_find_marked / xas_init_marks
ci2-upstream-kcsan-gce 2023/01/21 22:17 upstream f883675bf652 cc0f9968 .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in xas_find_marked / xas_init_marks
ci2-upstream-kcsan-gce 2023/01/20 10:16 upstream d368967cb103 dd15ff29 .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in xas_find_marked / xas_init_marks
ci2-upstream-kcsan-gce 2023/01/19 07:19 upstream 7287904c8771 66fca3ae .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in xas_find_marked / xas_init_marks
ci2-upstream-kcsan-gce 2023/01/17 16:32 upstream 6e50979a9c87 42660d9e .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in xas_find_marked / xas_init_marks
ci2-upstream-kcsan-gce 2023/01/16 22:46 upstream d532dd102151 a63719e7 .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in xas_find_marked / xas_init_marks
ci2-upstream-kcsan-gce 2023/01/11 07:41 upstream 40c18f363a08 48bc529a .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in xas_find_marked / xas_init_marks
ci2-upstream-kcsan-gce 2022/12/30 22:19 upstream bff687b3dad6 ab32d508 .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in xas_find_marked / xas_init_marks
ci2-upstream-kcsan-gce 2022/12/26 06:45 upstream 1b929c02afd3 9da18ae8 .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in xas_find_marked / xas_init_marks
ci2-upstream-kcsan-gce 2022/12/23 18:36 upstream 8395ae05cb5a 9da18ae8 .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in xas_find_marked / xas_init_marks
ci2-upstream-kcsan-gce 2022/12/22 15:28 upstream 0a924817d2ed 9da18ae8 .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in xas_find_marked / xas_init_marks
ci2-upstream-kcsan-gce 2022/12/18 15:57 upstream f9ff5644bcc0 05494336 .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in xas_find_marked / xas_init_marks
ci2-upstream-kcsan-gce 2022/12/14 16:30 upstream e2ca6ba6ba01 b18f0a64 .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in xas_find_marked / xas_init_marks
ci2-upstream-kcsan-gce 2022/12/08 07:06 upstream 479174d402bc d88f3abb .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in xas_find_marked / xas_init_marks
ci2-upstream-kcsan-gce 2022/12/06 05:27 upstream 76dcd734eca2 045cbb84 .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in xas_find_marked / xas_init_marks
ci2-upstream-kcsan-gce 2022/11/27 00:48 upstream 644e9524388a f4470a7b .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in xas_find_marked / xas_init_marks
ci2-upstream-kcsan-gce 2022/11/20 17:35 upstream 77c51ba552a1 5bb70014 .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in xas_find_marked / xas_init_marks
ci2-upstream-kcsan-gce 2022/11/19 22:37 upstream fe24a97cf254 5bb70014 .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in xas_find_marked / xas_init_marks
ci2-upstream-kcsan-gce 2022/11/14 17:28 upstream 094226ad94f4 943f4cb8 .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in xas_find_marked / xas_init_marks
ci2-upstream-kcsan-gce 2022/11/13 09:15 upstream fef7fd48922d f42ee5d8 .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in xas_find_marked / xas_init_marks
ci2-upstream-kcsan-gce 2022/11/10 02:36 upstream f67dd6ce0723 b2488a87 .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in xas_find_marked / xas_init_marks
ci2-upstream-kcsan-gce 2022/11/08 23:46 upstream f141df371335 060f945e .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in xas_find_marked / xas_init_marks
ci2-upstream-kcsan-gce 2022/11/06 21:47 upstream 089d1c31224e 6d752409 .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in xas_find_marked / xas_init_marks
ci2-upstream-kcsan-gce 2022/11/06 07:32 upstream 2f5065a0bc9d 6d752409 .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in xas_find_marked / xas_init_marks
ci2-upstream-kcsan-gce 2022/11/04 22:20 upstream ee6050c8af96 6d752409 .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in xas_find_marked / xas_init_marks
ci2-upstream-kcsan-gce 2022/11/04 05:22 upstream f2f32f8af2b0 6d752409 .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in xas_find_marked / xas_init_marks
ci2-upstream-kcsan-gce 2022/11/02 23:03 upstream 8f71a2b3f435 08977f5d .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in xas_find_marked / xas_init_marks
ci2-upstream-kcsan-gce 2022/10/30 10:13 upstream 882ad2a2a8ff 2a71366b .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in xas_find_marked / xas_init_marks
ci2-upstream-kcsan-gce 2022/10/28 19:10 upstream 05c31d25cc96 8168b69e .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in xas_find_marked / xas_init_marks
ci2-upstream-kcsan-gce 2022/10/24 12:31 upstream 247f34f7b803 faae2fda .config console log report info [disk image] [vmlinux] KCSAN: data-race in xas_find_marked / xas_init_marks
ci2-upstream-kcsan-gce 2022/10/22 07:00 upstream 440b7895c990 c0b80a55 .config console log report info [disk image] [vmlinux] KCSAN: data-race in xas_find_marked / xas_init_marks
ci2-upstream-kcsan-gce 2022/10/21 10:22 upstream 6d36c728bc2e 63e790dd .config console log report info [disk image] [vmlinux] KCSAN: data-race in xas_find_marked / xas_init_marks
ci2-upstream-kcsan-gce 2022/10/16 16:41 upstream 1501278bb7ba 67cb024c .config console log report info [disk image] [vmlinux] KCSAN: data-race in xas_find_marked / xas_init_marks
ci2-upstream-kcsan-gce 2022/10/16 00:49 upstream 19d17ab7c68b 67cb024c .config console log report info [disk image] [vmlinux] KCSAN: data-race in xas_find_marked / xas_init_marks
ci2-upstream-kcsan-gce 2022/10/14 19:59 upstream 9c9155a3509a 4954e4b2 .config console log report info [disk image] [vmlinux] KCSAN: data-race in xas_find_marked / xas_init_marks
ci2-upstream-kcsan-gce 2021/05/31 23:36 upstream c2131f7e73c9 032639db .config console log report info KCSAN: data-race in xas_find_marked / xas_init_marks
ci2-upstream-kcsan-gce 2021/05/28 09:25 upstream 97e5bf604b7a 858ea628 .config console log report info KCSAN: data-race in xas_find_marked / xas_init_marks
ci2-upstream-kcsan-gce 2021/01/16 21:15 upstream 54c6247d06f1 65a7a854 .config console log report info
ci2-upstream-kcsan-gce 2020/12/07 21:22 upstream cd796ed33450 51a9082e .config console log report info
* Struck through repros no longer work on HEAD.