syzbot


KCSAN: data-race in blkdev_flush_mapping / xas_store

Status: auto-closed as invalid on 2022/03/02 02:24
Reported-by: syzbot+@syzkaller.appspotmail.com
First crash: 314d, last: 314d

Sample crash report:
BUG: KCSAN: data-race in blkdev_flush_mapping / xas_store

write to 0xffff888101379b80 of 8 bytes by task 1921 on cpu 1:
 xas_delete_node lib/xarray.c:497 [inline]
 update_node lib/xarray.c:756 [inline]
 xas_store+0x995/0xca0 lib/xarray.c:841
 page_cache_delete mm/filemap.c:140 [inline]
 __filemap_remove_folio+0x1a7/0x2c0 mm/filemap.c:219
 __delete_from_page_cache include/linux/pagemap.h:934 [inline]
 __remove_mapping+0x49d/0x600 mm/vmscan.c:1317
 remove_mapping+0x22/0x60 mm/vmscan.c:1344
 invalidate_complete_page mm/truncate.c:214 [inline]
 invalidate_inode_page+0x15d/0x190 mm/truncate.c:312
 __invalidate_mapping_pages+0x111/0x2b0 mm/truncate.c:526
 invalidate_mapping_pages+0x23/0x30 mm/truncate.c:565
 invalidate_bdev block/bdev.c:88 [inline]
 __invalidate_device+0xa9/0xc0 block/bdev.c:1008
 disk_force_media_change+0x112/0x170 block/disk-events.c:310
 __loop_clr_fd+0x4a1/0x5d0 drivers/block/loop.c:1149
 loop_rundown_workfn+0x3e/0xb0 drivers/block/loop.c:1185
 process_one_work+0x3f6/0x960 kernel/workqueue.c:2307
 worker_thread+0x616/0xa70 kernel/workqueue.c:2454
 kthread+0x1bf/0x1e0 kernel/kthread.c:377
 ret_from_fork+0x1f/0x30

read to 0xffff888101379b80 of 8 bytes by task 15417 on cpu 0:
 xa_empty include/linux/xarray.h:405 [inline]
 mapping_empty include/linux/pagemap.h:23 [inline]
 kill_bdev block/bdev.c:73 [inline]
 blkdev_flush_mapping+0xbe/0x230 block/bdev.c:656
 blkdev_put_whole block/bdev.c:687 [inline]
 blkdev_put+0x394/0x4a0 block/bdev.c:944
 blkdev_close+0x32/0x40 block/fops.c:515
 __fput+0x295/0x520 fs/file_table.c:311
 ____fput+0x11/0x20 fs/file_table.c:344
 task_work_run+0x8e/0x110 kernel/task_work.c:164
 tracehook_notify_resume include/linux/tracehook.h:188 [inline]
 exit_to_user_mode_loop kernel/entry/common.c:175 [inline]
 exit_to_user_mode_prepare+0x160/0x190 kernel/entry/common.c:207
 __syscall_exit_to_user_mode_work kernel/entry/common.c:289 [inline]
 syscall_exit_to_user_mode+0x20/0x40 kernel/entry/common.c:300
 do_syscall_64+0x50/0xd0 arch/x86/entry/common.c:86
 entry_SYSCALL_64_after_hwframe+0x44/0xae

value changed: 0xffff88813bd13242 -> 0x0000000000000000

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

Crashes (1):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci2-upstream-kcsan-gce 2022/01/26 02:15 upstream 49d766f3a0e4 2cbffd88 .config log report info KCSAN: data-race in blkdev_flush_mapping / xas_store
* Struck through repros no longer work on HEAD.