syzbot


KCSAN: data-race in write_cache_pages / write_cache_pages

Status: auto-closed as invalid on 2020/03/24 21:40
Reported-by: syzbot+@syzkaller.appspotmail.com
First crash: 1144d, last: 1121d
similar bugs (8):
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in write_cache_pages / write_cache_pages (5) 4 424d 467d 0/24 auto-closed as invalid on 2022/01/15 16:41
upstream KCSAN: data-race in write_cache_pages / write_cache_pages (3) 1 610d 610d 0/24 auto-closed as invalid on 2021/07/13 22:52
upstream KCSAN: data-race in write_cache_pages / write_cache_pages (4) 1 558d 558d 0/24 auto-closed as invalid on 2021/09/04 02:13
upstream KCSAN: data-race in write_cache_pages / write_cache_pages (7) 1 257d 257d 0/24 auto-closed as invalid on 2022/07/02 07:32
upstream KCSAN: data-race in write_cache_pages / write_cache_pages (9) 1 138d 138d 0/24 auto-obsoleted due to no activity on 2022/10/29 12:30
upstream KCSAN: data-race in write_cache_pages / write_cache_pages (8) 2 199d 220d 0/24 auto-closed as invalid on 2022/08/29 06:43
upstream KCSAN: data-race in write_cache_pages / write_cache_pages (2) 2 823d 794d 0/24 auto-closed as invalid on 2020/12/21 11:55
upstream KCSAN: data-race in write_cache_pages / write_cache_pages (6) 2 313d 340d 0/24 auto-closed as invalid on 2022/05/06 22:51

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

write to 0xffff88821aef66b8 of 8 bytes by task 5121 on cpu 1:
 write_cache_pages+0x7be/0xb40 mm/page-writeback.c:2289
 generic_writepages mm/page-writeback.c:2329 [inline]
 generic_writepages+0x79/0xc0 mm/page-writeback.c:2318
 blkdev_writepages+0x27/0x40 fs/block_dev.c:2060
 do_writepages+0x6b/0x170 mm/page-writeback.c:2344
 __filemap_fdatawrite_range+0x1c5/0x230 mm/filemap.c:421
 __filemap_fdatawrite mm/filemap.c:429 [inline]
 filemap_fdatawrite mm/filemap.c:434 [inline]
 filemap_write_and_wait mm/filemap.c:640 [inline]
 filemap_write_and_wait+0xad/0x150 mm/filemap.c:635
 __sync_blockdev+0x5d/0x90 fs/block_dev.c:491
 __sync_filesystem fs/sync.c:40 [inline]
 sync_filesystem fs/sync.c:67 [inline]
 sync_filesystem+0x186/0x1a0 fs/sync.c:48
 ovl_sync_fs+0x92/0xa0 fs/overlayfs/super.c:276
 __sync_filesystem fs/sync.c:39 [inline]
 sync_filesystem fs/sync.c:67 [inline]
 sync_filesystem+0x168/0x1a0 fs/sync.c:48
 generic_shutdown_super+0x6b/0x260 fs/super.c:448
 kill_anon_super+0x2f/0x50 fs/super.c:1106
 deactivate_locked_super+0x64/0xb0 fs/super.c:335
 deactivate_super fs/super.c:366 [inline]
 deactivate_super+0xca/0xe0 fs/super.c:362
 cleanup_mnt+0x27f/0x330 fs/namespace.c:1102
 __cleanup_mnt+0x1f/0x30 fs/namespace.c:1109
 task_work_run+0xf6/0x130 kernel/task_work.c:113
 tracehook_notify_resume include/linux/tracehook.h:188 [inline]
 exit_to_usermode_loop+0x2b4/0x2c0 arch/x86/entry/common.c:164
 prepare_exit_to_usermode arch/x86/entry/common.c:195 [inline]
 syscall_return_slowpath arch/x86/entry/common.c:278 [inline]
 do_syscall_64+0x384/0x3a0 arch/x86/entry/common.c:304
 entry_SYSCALL_64_after_hwframe+0x44/0xa9

write to 0xffff88821aef66b8 of 8 bytes by task 31297 on cpu 0:
 write_cache_pages+0x7be/0xb40 mm/page-writeback.c:2289
 generic_writepages mm/page-writeback.c:2329 [inline]
 generic_writepages+0x79/0xc0 mm/page-writeback.c:2318
 blkdev_writepages+0x27/0x40 fs/block_dev.c:2060
 do_writepages+0x6b/0x170 mm/page-writeback.c:2344
 __filemap_fdatawrite_range+0x1c5/0x230 mm/filemap.c:421
 __filemap_fdatawrite mm/filemap.c:429 [inline]
 filemap_flush+0x2d/0x40 mm/filemap.c:456
 __sync_blockdev fs/block_dev.c:490 [inline]
 __sync_blockdev+0x81/0x90 fs/block_dev.c:485
 __sync_filesystem fs/sync.c:40 [inline]
 sync_filesystem+0x116/0x1a0 fs/sync.c:64
 ovl_sync_fs+0x92/0xa0 fs/overlayfs/super.c:276
 __sync_filesystem fs/sync.c:39 [inline]
 sync_filesystem fs/sync.c:67 [inline]
 sync_filesystem+0x168/0x1a0 fs/sync.c:48
 generic_shutdown_super+0x6b/0x260 fs/super.c:448
 kill_anon_super+0x2f/0x50 fs/super.c:1106
 deactivate_locked_super+0x64/0xb0 fs/super.c:335
 deactivate_super fs/super.c:366 [inline]
 deactivate_super+0xca/0xe0 fs/super.c:362
 cleanup_mnt+0x27f/0x330 fs/namespace.c:1102
 __cleanup_mnt+0x1f/0x30 fs/namespace.c:1109
 task_work_run+0xf6/0x130 kernel/task_work.c:113
 tracehook_notify_resume include/linux/tracehook.h:188 [inline]
 exit_to_usermode_loop+0x2b4/0x2c0 arch/x86/entry/common.c:164
 prepare_exit_to_usermode arch/x86/entry/common.c:195 [inline]
 syscall_return_slowpath arch/x86/entry/common.c:278 [inline]
 do_syscall_64+0x384/0x3a0 arch/x86/entry/common.c:304
 entry_SYSCALL_64_after_hwframe+0x44/0xa9

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

Crashes (2):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets Title
ci2-upstream-kcsan-gce 2020/01/14 21:34 https://github.com/google/ktsan.git kcsan 245a43005292 fa12bd3c .config console log report
ci2-upstream-kcsan-gce 2019/12/23 10:23 https://github.com/google/ktsan.git kcsan 245a43005292 be5c2c81 .config console log report
* Struck through repros no longer work on HEAD.