syzbot


KCSAN: data-race in filemap_flush / xas_set_mark

Status: auto-closed as invalid on 2021/07/03 02:34
Subsystems: fs mm
[Documentation on labels]
First crash: 1099d, last: 1064d
Similar bugs (1)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in filemap_flush / xas_set_mark (2) fs mm 20 831d 1020d 0/26 auto-closed as invalid on 2022/02/21 04:06

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

write to 0xffff888101394be4 of 4 bytes by task 1817 on cpu 0:
 xa_mark_set lib/xarray.c:69 [inline]
 xas_set_mark+0x13e/0x150 lib/xarray.c:889
 __test_set_page_writeback+0x27f/0x500 mm/page-writeback.c:2784
 set_page_writeback include/linux/page-flags.h:562 [inline]
 __block_write_full_page+0x5d4/0xa10 fs/buffer.c:1825
 block_write_full_page+0x240/0x260 fs/buffer.c:3001
 blkdev_writepage+0x20/0x30 fs/block_dev.c:639
 __writepage+0x32/0xc0 mm/page-writeback.c:2311
 write_cache_pages+0x4d7/0x810 mm/page-writeback.c:2246
 generic_writepages+0x64/0xa0 mm/page-writeback.c:2337
 blkdev_writepages+0x19/0x20 fs/block_dev.c:1753
 do_writepages+0x7b/0x150 mm/page-writeback.c:2352
 __writeback_single_inode+0x80/0x450 fs/fs-writeback.c:1467
 writeback_sb_inodes+0x564/0xf10 fs/fs-writeback.c:1732
 __writeback_inodes_wb fs/fs-writeback.c:1801 [inline]
 wb_writeback+0x327/0x700 fs/fs-writeback.c:1907
 wb_check_background_flush fs/fs-writeback.c:1975 [inline]
 wb_do_writeback+0x4ce/0x510 fs/fs-writeback.c:2063
 wb_workfn+0xc8/0x520 fs/fs-writeback.c:2091
 process_one_work+0x3e9/0x8f0 kernel/workqueue.c:2276
 worker_thread+0x636/0xae0 kernel/workqueue.c:2422
 kthread+0x1d0/0x1f0 kernel/kthread.c:313
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:294

read to 0xffff888101394be4 of 4 bytes by task 1776 on cpu 1:
 xa_marked include/linux/xarray.h:418 [inline]
 mapping_tagged include/linux/fs.h:489 [inline]
 __filemap_fdatawrite_range mm/filemap.c:409 [inline]
 __filemap_fdatawrite mm/filemap.c:421 [inline]
 filemap_flush+0xfc/0x160 mm/filemap.c:448
 __sync_blockdev+0x69/0x70 fs/block_dev.c:525
 __sync_filesystem fs/sync.c:40 [inline]
 sync_filesystem+0xcb/0x160 fs/sync.c:64
 generic_shutdown_super+0x42/0x230 fs/super.c:448
 kill_block_super+0x4a/0x90 fs/super.c:1395
 deactivate_locked_super+0x65/0xd0 fs/super.c:335
 deactivate_super+0x85/0x90 fs/super.c:366
 cleanup_mnt+0x267/0x2d0 fs/namespace.c:1136
 __cleanup_mnt+0x15/0x20 fs/namespace.c:1143
 task_work_run+0xae/0x130 kernel/task_work.c:164
 tracehook_notify_resume include/linux/tracehook.h:189 [inline]
 exit_to_user_mode_loop kernel/entry/common.c:174 [inline]
 exit_to_user_mode_prepare+0x156/0x190 kernel/entry/common.c:208
 __syscall_exit_to_user_mode_work kernel/entry/common.c:290 [inline]
 syscall_exit_to_user_mode+0x20/0x40 kernel/entry/common.c:301
 do_syscall_64+0x56/0x90 arch/x86/entry/common.c:57
 entry_SYSCALL_64_after_hwframe+0x44/0xae

value changed: 0x00800021 -> 0x01800021

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

Crashes (5):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2021/05/29 02:30 upstream 5ff2756afde0 858ea628 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in filemap_flush / xas_set_mark
2021/05/24 22:41 upstream c4681547bcce 3c7fef33 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in filemap_flush / xas_set_mark
2021/05/12 14:40 upstream 88b06399c9c7 86294427 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in filemap_flush / xas_set_mark
2021/04/26 13:14 upstream 9f4ad9e425a1 805b5003 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in filemap_flush / xas_set_mark
2021/04/24 01:33 upstream 8db5efb83fa9 17f0b706 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in filemap_flush / xas_set_mark
* Struck through repros no longer work on HEAD.