syzbot


KCSAN: data-race in __filemap_add_folio / filemap_write_and_wait_range

Status: moderation: reported on 2022/01/06 20:11
Subsystems: mm
[Documentation on labels]
Reported-by: syzbot+06d291120ff02d083cb8@syzkaller.appspotmail.com
First crash: 1115d, last: 7h05m

Sample crash report:
netlink: 56 bytes leftover after parsing attributes in process `syz.2.1168'.
loop2: detected capacity change from 0 to 1024
EXT4-fs: Ignoring removed orlov option
EXT4-fs: Ignoring removed nomblk_io_submit option
==================================================================
BUG: KCSAN: data-race in __filemap_add_folio / filemap_write_and_wait_range

read-write to 0xffff8881006343f0 of 8 bytes by task 3306 on cpu 0:
 __filemap_add_folio+0x430/0x6f0 mm/filemap.c:920
 filemap_add_folio+0x9c/0x1b0 mm/filemap.c:972
 page_cache_ra_unbounded+0x175/0x310 mm/readahead.c:268
 do_page_cache_ra mm/readahead.c:320 [inline]
 force_page_cache_ra mm/readahead.c:349 [inline]
 page_cache_sync_ra+0x252/0x670 mm/readahead.c:562
 page_cache_sync_readahead include/linux/pagemap.h:1394 [inline]
 filemap_get_pages+0x2c1/0x10e0 mm/filemap.c:2547
 filemap_read+0x221/0x6a0 mm/filemap.c:2647
 blkdev_read_iter+0x20e/0x2c0 block/fops.c:767
 new_sync_read fs/read_write.c:484 [inline]
 vfs_read+0x5dc/0x700 fs/read_write.c:565
 ksys_read+0xe8/0x1b0 fs/read_write.c:708
 __do_sys_read fs/read_write.c:717 [inline]
 __se_sys_read fs/read_write.c:715 [inline]
 __x64_sys_read+0x42/0x50 fs/read_write.c:715
 x64_sys_call+0x2874/0x2dc0 arch/x86/include/generated/asm/syscalls_64.h:1
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0xc9/0x1c0 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

read to 0xffff8881006343f0 of 8 bytes by task 8835 on cpu 1:
 mapping_needs_writeback mm/filemap.c:635 [inline]
 filemap_write_and_wait_range+0x59/0x360 mm/filemap.c:684
 filemap_write_and_wait include/linux/pagemap.h:68 [inline]
 sync_blockdev block/bdev.c:219 [inline]
 set_blocksize+0x1d0/0x270 block/bdev.c:171
 sb_set_blocksize block/bdev.c:182 [inline]
 sb_min_blocksize+0x63/0xe0 block/bdev.c:198
 ext4_load_super fs/ext4/super.c:5038 [inline]
 __ext4_fill_super fs/ext4/super.c:5259 [inline]
 ext4_fill_super+0x38b/0x3a10 fs/ext4/super.c:5733
 get_tree_bdev_flags+0x29f/0x310 fs/super.c:1636
 get_tree_bdev+0x1f/0x30 fs/super.c:1659
 ext4_get_tree+0x1c/0x30 fs/ext4/super.c:5765
 vfs_get_tree+0x56/0x1e0 fs/super.c:1814
 do_new_mount+0x227/0x690 fs/namespace.c:3507
 path_mount+0x49b/0xb30 fs/namespace.c:3834
 do_mount fs/namespace.c:3847 [inline]
 __do_sys_mount fs/namespace.c:4057 [inline]
 __se_sys_mount+0x27c/0x2d0 fs/namespace.c:4034
 __x64_sys_mount+0x67/0x80 fs/namespace.c:4034
 x64_sys_call+0x2c84/0x2dc0 arch/x86/include/generated/asm/syscalls_64.h:166
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0xc9/0x1c0 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

value changed: 0x0000000000000005 -> 0x0000000000000006

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 UID: 0 PID: 8835 Comm: syz.2.1168 Not tainted 6.12.0-syzkaller-01892-g8f7c8b88bda4 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/30/2024
==================================================================
EXT4-fs (loop2): mounted filesystem 00000000-0000-0000-0000-000000000000 r/w without journal. Quota mode: none.

Crashes (808):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/11/20 23:15 upstream 8f7c8b88bda4 4fca1650 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_add_folio / filemap_write_and_wait_range
2024/11/11 21:53 upstream 2d5404caa8c7 0c4b1325 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_add_folio / filemap_write_and_wait_range
2024/11/09 00:37 upstream f1dce1f09380 6b856513 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_add_folio / filemap_write_and_wait_range
2024/11/06 19:04 upstream 7758b206117d df3dc63b .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_add_folio / filemap_write_and_wait_range
2024/11/04 05:11 upstream a33ab3f94f51 f00eed24 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_add_folio / filemap_write_and_wait_range
2024/11/02 18:30 upstream 11066801dd4b f00eed24 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_add_folio / filemap_write_and_wait_range
2024/10/20 19:55 upstream 715ca9dd687f cd6fc0a3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_add_folio / filemap_write_and_wait_range
2024/10/16 23:31 upstream c964ced77262 666f77ed .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_add_folio / filemap_write_and_wait_range
2024/10/15 17:24 upstream eca631b8fe80 7eb57b4a .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_add_folio / filemap_write_and_wait_range
2024/10/14 21:50 upstream eca631b8fe80 b01b6661 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_add_folio / filemap_write_and_wait_range
2024/10/13 14:45 upstream 36c254515dc6 084d8178 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_add_folio / filemap_write_and_wait_range
2024/10/08 09:54 upstream 87d6aab2389e 402f1df0 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_add_folio / filemap_write_and_wait_range
2024/10/05 09:46 upstream 27cc6fdf7201 d7906eff .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_add_folio / filemap_write_and_wait_range
2024/10/05 07:10 upstream 2f91ff27b0ee d7906eff .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_add_folio / filemap_write_and_wait_range
2024/10/04 00:40 upstream 7ec462100ef9 d7906eff .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_add_folio / filemap_write_and_wait_range
2024/09/29 18:47 upstream e7ed34365879 ba29ff75 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_add_folio / filemap_write_and_wait_range
2024/09/23 12:50 upstream de5cb0dcb74c 89298aad .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_add_folio / filemap_write_and_wait_range
2024/09/22 05:02 upstream 7856a565416e 6f888b75 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_add_folio / filemap_write_and_wait_range
2024/09/20 22:10 upstream baeb9a7d8b60 6f888b75 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_add_folio / filemap_write_and_wait_range
2024/09/18 13:26 upstream bdf56c7580d2 c673ca06 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_add_folio / filemap_write_and_wait_range
2024/09/16 11:51 upstream 98f7e32f20d2 08d8a733 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_add_folio / filemap_write_and_wait_range
2024/09/14 12:20 upstream b7718454f937 c7e35043 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_add_folio / filemap_write_and_wait_range
2024/09/12 22:17 upstream 77f587896757 60e1a995 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_add_folio / filemap_write_and_wait_range
2024/09/10 20:01 upstream 8d8d276ba2fb 86aa7bd7 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_add_folio / filemap_write_and_wait_range
2024/09/09 12:42 upstream da3ea35007d0 073f8be2 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_add_folio / filemap_write_and_wait_range
2024/09/09 06:57 upstream 5dadc1be8fc5 9750182a .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_add_folio / filemap_write_and_wait_range
2024/09/07 01:09 upstream b831f83e40a2 9750182a .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_add_folio / filemap_write_and_wait_range
2024/09/03 23:43 upstream 88fac17500f4 326f9c5a .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_add_folio / filemap_write_and_wait_range
2024/09/03 15:43 upstream 67784a74e258 326f9c5a .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_add_folio / filemap_write_and_wait_range
2024/09/02 02:10 upstream c9f016e72b5c 1eda0d14 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_add_folio / filemap_write_and_wait_range
2024/08/30 14:35 upstream 20371ba12063 ee2602b8 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_add_folio / filemap_write_and_wait_range
2024/08/29 01:52 upstream 86987d84b968 ef3de9e8 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_add_folio / filemap_write_and_wait_range
2024/08/25 06:55 upstream 780bdc1ba776 d7d32352 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_add_folio / filemap_write_and_wait_range
2024/08/23 00:31 upstream 872cf28b8df9 ce8a9099 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_add_folio / filemap_write_and_wait_range
2024/08/22 07:09 upstream 872cf28b8df9 ca02180f .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_add_folio / filemap_write_and_wait_range
2024/08/21 00:12 upstream 521b1e7f4cf0 9f0ab3fb .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_add_folio / filemap_write_and_wait_range
2024/08/16 16:48 upstream d7a5aa4b3c00 e1c76ab2 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_add_folio / filemap_write_and_wait_range
2024/08/16 01:19 upstream 1fb918967b56 e4bacdaf .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_add_folio / filemap_write_and_wait_range
2024/08/13 15:08 upstream d74da846046a f21a18ca .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_add_folio / filemap_write_and_wait_range
2024/08/13 05:13 upstream d74da846046a 7b0f4b46 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_add_folio / filemap_write_and_wait_range
2024/08/11 17:52 upstream 5189dafa4cf9 6f4edef4 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_add_folio / filemap_write_and_wait_range
2024/08/09 10:43 upstream ee9a43b7cfe2 61405512 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_add_folio / filemap_write_and_wait_range
2024/08/08 19:37 upstream 6a0e38264012 61405512 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_add_folio / filemap_write_and_wait_range
2024/08/08 12:30 upstream 6a0e38264012 de12cf65 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_add_folio / filemap_write_and_wait_range
2024/08/06 17:49 upstream eb5e56d14912 1ef9fe42 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_add_folio / filemap_write_and_wait_range
2024/08/03 09:19 upstream 1c4246294c98 1786a2a8 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_add_folio / filemap_write_and_wait_range
2024/07/31 16:35 upstream e4fc196f5ba3 6fde257d .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_add_folio / filemap_write_and_wait_range
2024/07/30 23:04 upstream 22f546873149 6fde257d .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_add_folio / filemap_write_and_wait_range
2024/07/27 12:13 upstream 3a7e02c040b1 46eb10b7 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_add_folio / filemap_write_and_wait_range
2022/01/06 17:04 upstream 75acfdb6fd92 6acc789a .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_add_folio / filemap_write_and_wait_range
2021/11/01 23:42 upstream e66435936756 098b5d53 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_add_folio / filemap_write_and_wait_range
* Struck through repros no longer work on HEAD.