syzbot


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

Status: moderation: reported on 2021/06/01 09:35
Subsystems: ext4
[Documentation on labels]
Reported-by: syzbot+a46b57de934a5996888a@syzkaller.appspotmail.com
First crash: 1257d, last: 2d09h
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 ext4 11 1304d 1394d 0/26 auto-closed as invalid on 2020/11/26 04:55

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

read-write to 0xffff888111dcb478 of 8 bytes by task 24716 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_clear_bit include/asm-generic/bitops/instrumented-non-atomic.h:114 [inline]
 node_clear_mark lib/xarray.c:102 [inline]
 xas_clear_mark lib/xarray.c:914 [inline]
 xas_init_marks+0x17e/0x320 lib/xarray.c:947
 xas_store+0x213/0xc90 lib/xarray.c:809
 page_cache_delete_batch mm/filemap.c:321 [inline]
 delete_from_page_cache_batch+0x31d/0x710 mm/filemap.c:343
 truncate_inode_pages_range+0x1c5/0x6b0 mm/truncate.c:359
 truncate_inode_pages mm/truncate.c:439 [inline]
 truncate_pagecache+0x53/0x70 mm/truncate.c:732
 ext4_setattr+0xa07/0xeb0 fs/ext4/inode.c:5448
 notify_change+0x814/0x8a0 fs/attr.c:497
 do_truncate+0x116/0x160 fs/open.c:65
 handle_truncate fs/namei.c:3308 [inline]
 do_open fs/namei.c:3654 [inline]
 path_openat+0x1a04/0x1d80 fs/namei.c:3807
 do_filp_open+0xf7/0x200 fs/namei.c:3834
 do_sys_openat2+0xab/0x120 fs/open.c:1406
 do_sys_open fs/open.c:1421 [inline]
 __do_sys_creat fs/open.c:1497 [inline]
 __se_sys_creat fs/open.c:1491 [inline]
 __x64_sys_creat+0x66/0x90 fs/open.c:1491
 x64_sys_call+0x2349/0x2d30 arch/x86/include/generated/asm/syscalls_64.h:86
 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 0xffff888111dcb478 of 8 bytes by task 24715 on cpu 0:
 xas_find_chunk include/linux/xarray.h:1723 [inline]
 xas_find_marked+0x216/0x660 lib/xarray.c:1369
 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+0x6ea/0x2110 fs/ext4/inode.c:2632
 ext4_writepages+0x159/0x2e0 fs/ext4/inode.c:2768
 do_writepages+0x1d8/0x480 mm/page-writeback.c:2613
 filemap_fdatawrite_wbc+0xdb/0x100 mm/filemap.c:397
 __filemap_fdatawrite_range mm/filemap.c:430 [inline]
 file_write_and_wait_range+0xc8/0x170 mm/filemap.c:788
 ext4_sync_file+0x134/0x6c0 fs/ext4/fsync.c:158
 vfs_fsync_range+0x122/0x140 fs/sync.c:188
 generic_write_sync include/linux/fs.h:2811 [inline]
 ext4_buffered_write_iter+0x338/0x380 fs/ext4/file.c:305
 ext4_file_write_iter+0x29f/0xe30
 call_write_iter include/linux/fs.h:2120 [inline]
 new_sync_write fs/read_write.c:497 [inline]
 vfs_write+0x765/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

value changed: 0xffffffffffffffff -> 0xffffffffffffff00

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 PID: 24715 Comm: syz-executor.2 Tainted: G        W          6.9.0-syzkaller-07387-g8c06da67d0bd #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/02/2024
==================================================================

Crashes (778):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/05/16 05:03 upstream 8c06da67d0bd ef5d53ed .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in xas_find_marked / xas_init_marks
2024/05/15 14:55 upstream b850dc206a57 94b087b1 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in xas_find_marked / xas_init_marks
2024/05/11 13:50 upstream cf87f46fd34d 9026e142 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in xas_find_marked / xas_init_marks
2024/05/03 12:07 upstream f03359bca01b dd26401e .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in xas_find_marked / xas_init_marks
2024/05/02 20:51 upstream 49a73b1652c5 ddfc15a1 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in xas_find_marked / xas_init_marks
2024/05/02 11:21 upstream 0106679839f7 3ba885bc .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in xas_find_marked / xas_init_marks
2024/04/28 12:46 upstream 2c8159388952 07b455f9 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in xas_find_marked / xas_init_marks
2024/04/27 04:31 upstream 5eb4573ea63d 07b455f9 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in xas_find_marked / xas_init_marks
2024/04/24 07:41 upstream 9d1ddab261f3 21339d7b .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in xas_find_marked / xas_init_marks
2024/04/23 12:13 upstream 71b1543c83d6 21339d7b .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in xas_find_marked / xas_init_marks
2024/04/21 20:34 upstream 48cf398f15fc af24b050 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in xas_find_marked / xas_init_marks
2024/04/20 09:24 upstream 13a2e429f644 af24b050 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in xas_find_marked / xas_init_marks
2024/04/19 12:29 upstream 2668e3ae2ef3 af24b050 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in xas_find_marked / xas_init_marks
2024/04/18 12:35 upstream 8cd26fd90c1a af24b050 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in xas_find_marked / xas_init_marks
2024/04/15 00:40 upstream 399f4dae683a c8349e48 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in xas_find_marked / xas_init_marks
2024/04/09 08:13 upstream 20cb38a7af88 f3234354 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in xas_find_marked / xas_init_marks
2024/04/07 05:00 upstream f2f80ac80987 ca620dd8 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in xas_find_marked / xas_init_marks
2024/04/05 11:44 upstream c88b9b4cde17 0ee3535e .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in xas_find_marked / xas_init_marks
2024/04/03 17:05 upstream 3e92c1e6cd87 51c4dcff .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in xas_find_marked / xas_init_marks
2024/03/17 01:37 upstream 66a27abac311 d615901c .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in xas_find_marked / xas_init_marks
2024/03/15 12:46 upstream e5eb28f6d1af d615901c .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in xas_find_marked / xas_init_marks
2024/03/06 07:30 upstream 29cd507cbec2 f39a7eed .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in xas_find_marked / xas_init_marks
2024/03/01 19:42 upstream 87adedeba51a 83acf9e0 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in xas_find_marked / xas_init_marks
2024/02/23 07:57 upstream ffd2cb6b718e 8d446f15 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in xas_find_marked / xas_init_marks
2024/02/19 12:41 upstream b401b621758e 3af7dd65 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in xas_find_marked / xas_init_marks
2024/02/06 11:09 upstream 99bd3cb0d12e 6404acf9 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in xas_find_marked / xas_init_marks
2024/01/20 21:28 upstream 125514880ddd 9bd8dcda .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in xas_find_marked / xas_init_marks
2024/01/20 02:58 upstream 9d1694dc91ce 9bd8dcda .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in xas_find_marked / xas_init_marks
2024/01/18 23:05 upstream 296455ade1fd 239abf84 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in xas_find_marked / xas_init_marks
2024/01/15 17:54 upstream 052d534373b7 2a7bcc7f .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in xas_find_marked / xas_init_marks
2024/01/13 06:58 upstream 052d534373b7 551587c1 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in xas_find_marked / xas_init_marks
2024/01/08 16:43 upstream 0dd3ee311255 d0304e9c .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in xas_find_marked / xas_init_marks
2024/01/07 15:14 upstream 52b1853b080a d0304e9c .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in xas_find_marked / xas_init_marks
2024/01/06 16:36 upstream 95c8a35f1c01 d0304e9c .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in xas_find_marked / xas_init_marks
2024/01/03 23:13 upstream ac865f00af29 28c42cff .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in xas_find_marked / xas_init_marks
2024/01/03 19:23 upstream 610a9b8f49fb 28c42cff .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in xas_find_marked / xas_init_marks
2024/01/01 00:27 upstream 2639772a11c8 fb427a07 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in xas_find_marked / xas_init_marks
2023/12/31 02:18 upstream 453f5db0619e fb427a07 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in xas_find_marked / xas_init_marks
2023/12/30 05:35 upstream f016f7547aee fb427a07 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in xas_find_marked / xas_init_marks
2023/12/29 00:35 upstream 505e701c0b2c fb427a07 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in xas_find_marked / xas_init_marks
2023/12/26 08:01 upstream fbafc3e621c3 fb427a07 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in xas_find_marked / xas_init_marks
2023/12/24 21:53 upstream 861deac3b092 fb427a07 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in xas_find_marked / xas_init_marks
2023/12/24 04:41 upstream 3f82f1c3a036 fb427a07 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in xas_find_marked / xas_init_marks
2023/12/23 06:16 upstream 5254c0cbc92d fb427a07 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in xas_find_marked / xas_init_marks
2023/12/22 14:24 upstream 24e0d2e527a3 4f9530a3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in xas_find_marked / xas_init_marks
2023/12/22 04:58 upstream 9a6b294ab496 4f9530a3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in xas_find_marked / xas_init_marks
2023/12/20 22:10 upstream 1a44b0073b92 de21eb89 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in xas_find_marked / xas_init_marks
2023/12/20 16:03 upstream 55cb5f43689d de21eb89 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in xas_find_marked / xas_init_marks
2023/12/20 02:19 upstream 55cb5f43689d 3ad490ea .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in xas_find_marked / xas_init_marks
2021/05/31 23:36 upstream c2131f7e73c9 032639db .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in xas_find_marked / xas_init_marks
2021/05/28 09:25 upstream 97e5bf604b7a 858ea628 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in xas_find_marked / xas_init_marks
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 ci2-upstream-kcsan-gce
* Struck through repros no longer work on HEAD.