syzbot


KCSAN: data-race in __xa_clear_mark / sync_inodes_sb (3)

Status: auto-closed as invalid on 2021/02/02 10:35
Subsystems: mm fs
[Documentation on labels]
First crash: 1213d, last: 1213d
Similar bugs (2)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in __xa_clear_mark / sync_inodes_sb (2) fs mm 2 1270d 1235d 0/26 auto-closed as invalid on 2020/12/21 11:51
upstream KCSAN: data-race in __xa_clear_mark / sync_inodes_sb fs mm 1 1395d 1395d 0/26 auto-closed as invalid on 2020/08/04 19:16

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

write to 0xffff88810d5e5c44 of 4 bytes by interrupt on cpu 1:
 xa_mark_clear lib/xarray.c:75 [inline]
 xas_clear_mark lib/xarray.c:921 [inline]
 __xa_clear_mark+0x1c4/0x1e0 lib/xarray.c:1916
 test_clear_page_writeback+0x321/0x520 mm/page-writeback.c:2739
 end_page_writeback+0xd7/0x260 mm/filemap.c:1494
 ext4_finish_bio+0x429/0x480 fs/ext4/page-io.c:143
 ext4_end_bio+0x1ba/0x310 fs/ext4/page-io.c:364
 bio_endio+0x285/0x350 block/bio.c:1450
 req_bio_endio block/blk-core.c:263 [inline]
 blk_update_request+0x4e5/0xb00 block/blk-core.c:1461
 scsi_end_request+0x51/0x470 drivers/scsi/scsi_lib.c:569
 scsi_io_completion+0x104/0xfb0 drivers/scsi/scsi_lib.c:968
 scsi_finish_command+0x263/0x2b0 drivers/scsi/scsi.c:214
 scsi_softirq_done+0xdf/0x440 drivers/scsi/scsi_lib.c:1446
 blk_done_softirq+0x145/0x190 block/blk-mq.c:588
 __do_softirq+0x13c/0x2c3 kernel/softirq.c:343
 asm_call_irq_on_stack+0xf/0x20
 __run_on_irqstack arch/x86/include/asm/irq_stack.h:26 [inline]
 run_on_irqstack_cond arch/x86/include/asm/irq_stack.h:77 [inline]
 do_softirq_own_stack+0x32/0x40 arch/x86/kernel/irq_64.c:77
 invoke_softirq kernel/softirq.c:226 [inline]
 __irq_exit_rcu+0xb4/0xc0 kernel/softirq.c:420
 common_interrupt+0xb5/0x130 arch/x86/kernel/irq.c:239
 asm_common_interrupt+0x1e/0x40 arch/x86/include/asm/idtentry.h:619
 check_kcov_mode kernel/kcov.c:163 [inline]
 write_comp_data kernel/kcov.c:218 [inline]
 __sanitizer_cov_trace_const_cmp8+0x2b/0x90 kernel/kcov.c:291
 __find_get_block_slow+0x9c/0x3b0 fs/buffer.c:207
 __find_get_block+0x14d/0x640 fs/buffer.c:1328
 __getblk_gfp+0x28/0x1f0 fs/buffer.c:1350
 sb_getblk include/linux/buffer_head.h:325 [inline]
 ext4_getblk+0x114/0x3c0 fs/ext4/inode.c:854
 ext4_bread_batch+0x60/0x3d0 fs/ext4/inode.c:920
 __ext4_find_entry+0x8d1/0xe10 fs/ext4/namei.c:1512
 ext4_find_entry fs/ext4/namei.c:1592 [inline]
 ext4_rmdir+0x1fc/0x960 fs/ext4/namei.c:3115
 vfs_rmdir+0x135/0x290 fs/namei.c:3715
 do_rmdir+0x16e/0x300 fs/namei.c:3776
 __do_sys_rmdir fs/namei.c:3794 [inline]
 __se_sys_rmdir fs/namei.c:3792 [inline]
 __x64_sys_rmdir+0x2c/0x30 fs/namei.c:3792
 do_syscall_64+0x39/0x80 arch/x86/entry/common.c:46
 entry_SYSCALL_64_after_hwframe+0x44/0xa9

read to 0xffff88810d5e5c44 of 4 bytes by task 8443 on cpu 0:
 xa_marked include/linux/xarray.h:416 [inline]
 mapping_tagged include/linux/fs.h:488 [inline]
 wait_sb_inodes fs/fs-writeback.c:2415 [inline]
 sync_inodes_sb+0x30e/0x450 fs/fs-writeback.c:2558
 __sync_filesystem fs/sync.c:34 [inline]
 sync_filesystem+0xe4/0x160 fs/sync.c:67
 ovl_sync_fs+0x94/0xc0 fs/overlayfs/super.c:286
 __sync_filesystem fs/sync.c:39 [inline]
 sync_filesystem+0x112/0x160 fs/sync.c:67
 generic_shutdown_super+0x3c/0x1f0 fs/super.c:448
 kill_anon_super+0x23/0x40 fs/super.c:1055
 deactivate_locked_super+0x6a/0xb0 fs/super.c:335
 deactivate_super+0x85/0x90 fs/super.c:366
 cleanup_mnt+0x277/0x2e0 fs/namespace.c:1118
 __cleanup_mnt+0x15/0x20 fs/namespace.c:1125
 task_work_run+0x8e/0x110 kernel/task_work.c:140
 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+0x16b/0x1a0 kernel/entry/common.c:201
 __syscall_exit_to_user_mode_work kernel/entry/common.c:291 [inline]
 syscall_exit_to_user_mode+0x20/0x40 kernel/entry/common.c:302
 do_syscall_64+0x45/0x80 arch/x86/entry/common.c:56
 entry_SYSCALL_64_after_hwframe+0x44/0xa9

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

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2020/12/29 10:29 upstream dea8dcf2a9fa 8259d56c .config console log report info ci2-upstream-kcsan-gce
* Struck through repros no longer work on HEAD.