syzbot


KCSAN: data-race in __add_to_page_cache_locked / ext4_writepages (2)

Status: auto-closed as invalid on 2021/01/25 22:34
Subsystems: ext4
[Documentation on labels]
Reported-by: syzbot+2c1b4e6c6c4369be36fd@syzkaller.appspotmail.com
First crash: 1610d, last: 1430d
Similar bugs (2)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in __add_to_page_cache_locked / ext4_writepages (3) ext4 33 1116d 1344d 0/28 auto-closed as invalid on 2021/12/06 03:13
upstream KCSAN: data-race in __add_to_page_cache_locked / ext4_writepages ext4 45 1629d 1856d 0/28 closed as invalid on 2020/06/18 14:24

Sample crash report:
==================================================================
BUG: KCSAN: data-race in __add_to_page_cache_locked / ext4_writepages

read-write to 0xffff888135503d18 of 8 bytes by task 12382 on cpu 0:
 __add_to_page_cache_locked+0x3a2/0x6b0 mm/filemap.c:888
 add_to_page_cache_lru+0xa0/0x1b0 mm/filemap.c:939
 pagecache_get_page+0x60f/0x980 mm/filemap.c:1848
 grab_cache_page_write_begin+0x3f/0x70 mm/filemap.c:3358
 ext4_da_write_begin+0x34d/0xaf0 fs/ext4/inode.c:2976
 generic_perform_write+0x196/0x3a0 mm/filemap.c:3408
 ext4_buffered_write_iter+0x2e5/0x3d0 fs/ext4/file.c:270
 ext4_file_write_iter+0x45e/0x1090 fs/ext4/file.c:503
 call_write_iter include/linux/fs.h:1901 [inline]
 do_iter_readv_writev+0x2cb/0x360 fs/read_write.c:740
 do_iter_write+0x112/0x4b0 fs/read_write.c:866
 vfs_iter_write+0x4c/0x70 fs/read_write.c:907
 iter_file_splice_write+0x42a/0x780 fs/splice.c:686
 do_splice_from fs/splice.c:764 [inline]
 direct_splice_actor+0x80/0xa0 fs/splice.c:933
 splice_direct_to_actor+0x345/0x650 fs/splice.c:888
 do_splice_direct+0xf5/0x170 fs/splice.c:976
 do_sendfile+0x5db/0xca0 fs/read_write.c:1257
 __do_sys_sendfile64 fs/read_write.c:1318 [inline]
 __se_sys_sendfile64 fs/read_write.c:1304 [inline]
 __x64_sys_sendfile64+0xf2/0x130 fs/read_write.c:1304
 do_syscall_64+0x39/0x80 arch/x86/entry/common.c:46
 entry_SYSCALL_64_after_hwframe+0x44/0xa9

read to 0xffff888135503d18 of 8 bytes by task 12384 on cpu 1:
 ext4_writepages+0x131/0x1e30 fs/ext4/inode.c:2660
 do_writepages+0x7b/0x150 mm/page-writeback.c:2352
 __filemap_fdatawrite_range+0x19d/0x1d0 mm/filemap.c:422
 file_write_and_wait_range+0x9f/0x120 mm/filemap.c:761
 ext4_sync_file+0x105/0x6c0 fs/ext4/fsync.c:151
 vfs_fsync_range+0x107/0x120 fs/sync.c:200
 generic_write_sync include/linux/fs.h:2737 [inline]
 ext4_buffered_write_iter+0x384/0x3d0 fs/ext4/file.c:278
 ext4_file_write_iter+0x45e/0x1090 fs/ext4/file.c:503
 call_write_iter include/linux/fs.h:1901 [inline]
 do_iter_readv_writev+0x2cb/0x360 fs/read_write.c:740
 do_iter_write+0x112/0x4b0 fs/read_write.c:866
 vfs_iter_write+0x4c/0x70 fs/read_write.c:907
 iter_file_splice_write+0x42a/0x780 fs/splice.c:686
 do_splice_from fs/splice.c:764 [inline]
 direct_splice_actor+0x80/0xa0 fs/splice.c:933
 splice_direct_to_actor+0x345/0x650 fs/splice.c:888
 do_splice_direct+0xf5/0x170 fs/splice.c:976
 do_sendfile+0x5db/0xca0 fs/read_write.c:1257
 __do_sys_sendfile64 fs/read_write.c:1318 [inline]
 __se_sys_sendfile64 fs/read_write.c:1304 [inline]
 __x64_sys_sendfile64+0xf2/0x130 fs/read_write.c:1304
 do_syscall_64+0x39/0x80 arch/x86/entry/common.c:46
 entry_SYSCALL_64_after_hwframe+0x44/0xa9

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 12384 Comm: syz-executor.1 Not tainted 5.10.0-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
==================================================================

Crashes (45):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2020/12/21 22:33 upstream 8653b778e454 04201c06 .config console log report info ci2-upstream-kcsan-gce
2020/12/19 23:49 upstream 467f8165a2b0 04201c06 .config console log report info ci2-upstream-kcsan-gce
2020/12/13 20:49 upstream ec6f5e0e5ca0 8f160dd5 .config console log report info ci2-upstream-kcsan-gce
2020/11/29 13:48 upstream aae5ab854e38 a0092f9d .config console log report info ci2-upstream-kcsan-gce
2020/11/26 19:14 upstream 4df910620beb 2f1cec62 .config console log report info ci2-upstream-kcsan-gce
2020/11/21 23:50 upstream a349e4c65960 0d27f508 .config console log report info ci2-upstream-kcsan-gce
2020/11/12 23:00 upstream af5043c89a8e 16fca0c8 .config console log report info ci2-upstream-kcsan-gce
2020/11/02 09:12 upstream 3cea11cd5e3b 8bc4594f .config console log report info ci2-upstream-kcsan-gce
2020/11/01 02:02 upstream c2dc4c073fb7 8bc4594f .config console log report info ci2-upstream-kcsan-gce
2020/10/28 17:57 upstream ed8780e3f2ec f24824d3 .config console log report info ci2-upstream-kcsan-gce
2020/10/28 00:15 upstream ed8780e3f2ec 96e03c1c .config console log report info ci2-upstream-kcsan-gce
2020/10/23 22:07 upstream 0adc313c4f20 2bb6666c .config console log report info ci2-upstream-kcsan-gce
2020/10/19 07:31 upstream 7cf726a59435 fea47c01 .config console log report info ci2-upstream-kcsan-gce
2020/10/12 09:00 upstream bbf5c979011a 4a77ae0b .config console log report info ci2-upstream-kcsan-gce
2020/09/19 01:46 upstream 92ab97adeefc 53ce8104 .config console log report info ci2-upstream-kcsan-gce
2020/09/17 08:07 upstream 5925fa68fe82 8247808b .config console log report info ci2-upstream-kcsan-gce
2020/09/16 13:32 upstream fc4f28bb3daf 77507d02 .config console log report info ci2-upstream-kcsan-gce
2020/09/16 06:37 upstream fc4f28bb3daf 18d7d030 .config console log report info ci2-upstream-kcsan-gce
2020/09/15 15:59 upstream fc4f28bb3daf 9e681632 .config console log report info ci2-upstream-kcsan-gce
2020/08/19 12:39 upstream 18445bf405cb db787902 .config console log report ci2-upstream-kcsan-gce
2020/08/15 01:28 upstream c9c9735c46f5 5ce13532 .config console log report ci2-upstream-kcsan-gce
2020/08/14 00:41 upstream 990f227371a4 54ce1ed6 .config console log report ci2-upstream-kcsan-gce
2020/08/10 15:02 upstream fc80c51fd4b2 7adc7b65 .config console log report ci2-upstream-kcsan-gce
2020/08/09 02:13 upstream 06a81c1c7db9 f721e4a0 .config console log report ci2-upstream-kcsan-gce
2020/07/31 12:21 upstream d8b9faec54ae 8df85ed9 .config console log report ci2-upstream-kcsan-gce
2020/07/26 01:33 upstream 04300d66f0a0 1f7cc1ca .config console log report ci2-upstream-kcsan-gce
2020/07/23 22:58 upstream f37e99aca03f 70c104a1 .config console log report ci2-upstream-kcsan-gce
2020/07/21 03:20 upstream 4fa640dc5230 d88894e6 .config console log report ci2-upstream-kcsan-gce
2020/07/20 09:39 upstream 5714ee50bb43 8caeeeb7 .config console log report ci2-upstream-kcsan-gce
2020/07/18 19:46 upstream 6cf7ccba29dc 9c812472 .config console log report ci2-upstream-kcsan-gce
2020/07/12 02:07 upstream 0aea6d5c5be3 7ba05d2d .config console log report ci2-upstream-kcsan-gce
2020/07/11 10:42 upstream 1df0d8960499 7ba05d2d .config console log report ci2-upstream-kcsan-gce
2020/07/10 11:25 upstream 42f82040ee66 56d01184 .config console log report ci2-upstream-kcsan-gce
2020/07/10 11:06 upstream 42f82040ee66 56d01184 .config console log report ci2-upstream-kcsan-gce
2020/07/08 19:51 upstream 63e1968a2c87 9f9845eb .config console log report ci2-upstream-kcsan-gce
2020/07/05 13:23 upstream 35e884f89df4 22f87567 .config console log report ci2-upstream-kcsan-gce
2020/07/04 14:22 upstream 35e884f89df4 4f739670 .config console log report ci2-upstream-kcsan-gce
2020/06/30 08:20 upstream 7c30b859a947 917afeaa .config console log report ci2-upstream-kcsan-gce
2020/06/28 14:12 upstream 719fdd32921f a2cdad9d .config console log report ci2-upstream-kcsan-gce
2020/06/28 12:14 upstream 719fdd32921f a2cdad9d .config console log report ci2-upstream-kcsan-gce
2020/06/27 23:02 upstream 6116dea80dfd a2cdad9d .config console log report ci2-upstream-kcsan-gce
2020/06/27 18:49 upstream 6116dea80dfd a2cdad9d .config console log report ci2-upstream-kcsan-gce
2020/06/27 14:57 upstream 1590a2e1c681 2defc703 .config console log report ci2-upstream-kcsan-gce
2020/06/26 07:30 upstream 4a21185cda0f aea82c00 .config console log report ci2-upstream-kcsan-gce
2020/06/25 02:16 upstream 26e122e97a3d 9d60b18e .config console log report ci2-upstream-kcsan-gce
* Struck through repros no longer work on HEAD.