syzbot


KCSAN: data-race in dd_insert_request / ll_back_merge_fn (2)

Status: auto-closed as invalid on 2022/09/04 15:40
Reported-by: syzbot+@syzkaller.appspotmail.com
First crash: 136d, last: 124d
similar bugs (1):
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in dd_insert_request / ll_back_merge_fn 3 556d 572d 0/24 auto-closed as invalid on 2021/06/29 16:33

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

write to 0xffff888101caf220 of 8 bytes by task 10630 on cpu 1:
 dd_insert_request+0x54c/0x570 block/mq-deadline.c:755
 dd_insert_requests+0xfc/0x140 block/mq-deadline.c:781
 blk_mq_sched_insert_request+0x203/0x220 block/blk-mq-sched.c:449
 blk_mq_submit_bio+0xbb1/0xe50 block/blk-mq.c:2848
 __submit_bio block/blk-core.c:648 [inline]
 __submit_bio_noacct_mq block/blk-core.c:725 [inline]
 submit_bio_noacct_nocheck+0x83d/0xaa0 block/blk-core.c:742
 submit_bio_noacct+0x690/0x7f0 block/blk-core.c:849
 submit_bio+0xfb/0x110
 submit_bh_wbc+0x2a8/0x2f0 fs/buffer.c:3039
 submit_bh+0x1e/0x30 fs/buffer.c:3045
 __ext4_read_bh fs/ext4/super.c:174 [inline]
 ext4_read_bh+0xf1/0x170 fs/ext4/super.c:198
 mext_page_mkuptodate+0x4bc/0x870 fs/ext4/move_extent.c:223
 move_extent_per_page+0x433/0xf10 fs/ext4/move_extent.c:353
 ext4_move_extents+0x60d/0x7d0 fs/ext4/move_extent.c:677
 __ext4_ioctl fs/ext4/ioctl.c:1269 [inline]
 ext4_ioctl+0x1879/0x2740 fs/ext4/ioctl.c:1519
 vfs_ioctl fs/ioctl.c:51 [inline]
 __do_sys_ioctl fs/ioctl.c:870 [inline]
 __se_sys_ioctl+0xcb/0x140 fs/ioctl.c:856
 __x64_sys_ioctl+0x3f/0x50 fs/ioctl.c:856
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x2b/0x70 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x63/0xcd

read to 0xffff888101caf220 of 8 bytes by task 1406 on cpu 0:
 req_set_nomerge block/blk.h:335 [inline]
 ll_back_merge_fn+0x2b3/0x4a0 block/blk-merge.c:615
 bio_attempt_back_merge+0x35/0x2f0 block/blk-merge.c:921
 blk_attempt_bio_merge+0x438/0x480 block/blk-merge.c:1003
 blk_attempt_plug_merge+0xb3/0xf0 block/blk-merge.c:1050
 blk_mq_attempt_bio_merge block/blk-mq.c:2707 [inline]
 blk_mq_get_new_requests block/blk-mq.c:2730 [inline]
 blk_mq_submit_bio+0x717/0xe50 block/blk-mq.c:2819
 __submit_bio block/blk-core.c:648 [inline]
 __submit_bio_noacct_mq block/blk-core.c:725 [inline]
 submit_bio_noacct_nocheck+0x83d/0xaa0 block/blk-core.c:742
 submit_bio_noacct+0x690/0x7f0 block/blk-core.c:849
 submit_bio+0xfb/0x110
 ext4_io_submit+0x86/0xa0 fs/ext4/page-io.c:378
 ext4_writepage+0x44c/0x750 fs/ext4/inode.c:2069
 __writepage+0x38/0xd0 mm/page-writeback.c:2399
 write_cache_pages+0x443/0xa30 mm/page-writeback.c:2334
 generic_writepages+0x7c/0xc0 mm/page-writeback.c:2425
 jbd2_journal_submit_inode_data_buffers+0xd0/0xf0 fs/jbd2/commit.c:208
 ext4_journal_submit_inode_data_buffers+0x53/0x140 fs/ext4/super.c:549
 journal_submit_data_buffers+0xf0/0x260 fs/jbd2/commit.c:258
 jbd2_journal_commit_transaction+0x764/0x3180 fs/jbd2/commit.c:582
 kjournald2+0x253/0x460 fs/jbd2/journal.c:213
 kthread+0x1a9/0x1e0 kernel/kthread.c:376
 ret_from_fork+0x1f/0x30

value changed: 0x0000000000000000 -> 0xffff8881031ba900

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 PID: 1406 Comm: jbd2/sda1-8 Not tainted 5.19.0-rc8-syzkaller-00155-g6a010258447d-dirty #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/22/2022
==================================================================

Crashes (2):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci2-upstream-kcsan-gce 2022/07/31 15:34 upstream 6a010258447d fef302b1 .config log report info KCSAN: data-race in dd_insert_request / ll_back_merge_fn
ci2-upstream-kcsan-gce 2022/07/19 20:27 upstream ca85855bdcae 775344bc .config log report info KCSAN: data-race in dd_insert_request / ll_back_merge_fn
* Struck through repros no longer work on HEAD.