syzbot


KCSAN: data-race in dd_insert_requests / ll_back_merge_fn (4)

Status: moderation: reported on 2024/05/29 04:45
Subsystems: block
[Documentation on labels]
Reported-by: syzbot+3ec6eb59b8705e9a9eda@syzkaller.appspotmail.com
First crash: 17d, last: 17d
Similar bugs (3)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in dd_insert_requests / ll_back_merge_fn block 1 299d 299d 0/27 auto-obsoleted due to no activity on 2023/09/25 06:43
upstream KCSAN: data-race in dd_insert_requests / ll_back_merge_fn (2) block 4 164d 188d 0/27 auto-obsoleted due to no activity on 2024/02/07 06:53
upstream KCSAN: data-race in dd_insert_requests / ll_back_merge_fn (3) block 1 93d 93d 0/27 auto-obsoleted due to no activity on 2024/04/17 22:32

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

write to 0xffff888101f81250 of 8 bytes by task 2748 on cpu 0:
 dd_insert_request block/mq-deadline.c:695 [inline]
 dd_insert_requests+0x4b6/0x670 block/mq-deadline.c:724
 blk_mq_dispatch_plug_list block/blk-mq.c:2749 [inline]
 blk_mq_flush_plug_list+0x647/0xde0 block/blk-mq.c:2799
 __blk_flush_plug+0x216/0x290 block/blk-core.c:1194
 blk_finish_plug+0x48/0x70 block/blk-core.c:1221
 jbd2_journal_commit_transaction+0x1bc5/0x33e0 fs/jbd2/commit.c:794
 kjournald2+0x243/0x430 fs/jbd2/journal.c:201
 kthread+0x1d1/0x210 kernel/kthread.c:389
 ret_from_fork+0x4b/0x60 arch/x86/kernel/process.c:147
 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244

read to 0xffff888101f81250 of 8 bytes by task 27893 on cpu 1:
 req_set_nomerge block/blk.h:374 [inline]
 ll_back_merge_fn+0x297/0x480 block/blk-merge.c:644
 bio_attempt_back_merge+0x5c/0x520 block/blk-merge.c:983
 blk_attempt_bio_merge+0x44f/0x490 block/blk-merge.c:1080
 blk_attempt_plug_merge+0xb5/0x100 block/blk-merge.c:1126
 blk_mq_attempt_bio_merge block/blk-mq.c:2840 [inline]
 blk_mq_submit_bio+0x597/0xd90 block/blk-mq.c:2977
 __submit_bio+0xf2/0x470 block/blk-core.c:627
 __submit_bio_noacct_mq block/blk-core.c:708 [inline]
 submit_bio_noacct_nocheck+0x295/0x6e0 block/blk-core.c:737
 submit_bio_noacct+0x6b9/0x870 block/blk-core.c:848
 submit_bio+0x218/0x230 block/blk-core.c:890
 swap_writepage_bdev_async mm/page_io.c:372 [inline]
 __swap_writepage+0x612/0xc50 mm/page_io.c:390
 swap_writepage+0xa9/0x160 mm/page_io.c:209
 pageout mm/vmscan.c:660 [inline]
 shrink_folio_list+0x194f/0x2560 mm/vmscan.c:1341
 reclaim_folio_list+0x81/0x1e0 mm/vmscan.c:2125
 reclaim_pages+0x215/0x270 mm/vmscan.c:2161
 madvise_cold_or_pageout_pte_range+0xe43/0xec0 mm/madvise.c:550
 walk_pmd_range mm/pagewalk.c:143 [inline]
 walk_pud_range mm/pagewalk.c:221 [inline]
 walk_p4d_range mm/pagewalk.c:256 [inline]
 walk_pgd_range+0x807/0xee0 mm/pagewalk.c:293
 __walk_page_range+0xc5/0x330 mm/pagewalk.c:395
 walk_page_range+0x395/0x4e0 mm/pagewalk.c:521
 madvise_pageout_page_range mm/madvise.c:609 [inline]
 madvise_pageout mm/madvise.c:636 [inline]
 madvise_vma_behavior mm/madvise.c:1042 [inline]
 madvise_walk_vmas mm/madvise.c:1268 [inline]
 do_madvise+0x1b09/0x2610 mm/madvise.c:1464
 __do_sys_madvise mm/madvise.c:1481 [inline]
 __se_sys_madvise mm/madvise.c:1479 [inline]
 __x64_sys_madvise+0x61/0x70 mm/madvise.c:1479
 x64_sys_call+0x285d/0x2d70 arch/x86/include/generated/asm/syscalls_64.h:29
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0xc9/0x1c0 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

value changed: 0x0000000000000000 -> 0xffff8881029d3400

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 27893 Comm: syz-executor.2 Tainted: G        W          6.10.0-rc1-syzkaller-00021-ge0cce98fe279 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/02/2024
==================================================================

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/05/29 04:44 upstream e0cce98fe279 34889ee3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in dd_insert_requests / ll_back_merge_fn
* Struck through repros no longer work on HEAD.