syzbot


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

Status: auto-obsoleted due to no activity on 2024/02/07 06:53
Subsystems: block
[Documentation on labels]
Reported-by: syzbot+e621c9fe4266358d53d6@syzkaller.appspotmail.com
First crash: 397d, last: 358d
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 493d 493d 0/28 auto-obsoleted due to no activity on 2023/09/25 06:43
upstream KCSAN: data-race in dd_insert_requests / ll_back_merge_fn (3) block 1 287d 287d 0/28 auto-obsoleted due to no activity on 2024/04/17 22:32
upstream KCSAN: data-race in dd_insert_requests / ll_back_merge_fn (4) block 1 211d 211d 0/28 auto-obsoleted due to no activity on 2024/07/03 04:45

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

write to 0xffff8881018b6010 of 8 bytes by task 22963 on cpu 1:
 dd_insert_request block/mq-deadline.c:837 [inline]
 dd_insert_requests+0x4b1/0x670 block/mq-deadline.c:878
 blk_mq_dispatch_plug_list block/blk-mq.c:2762 [inline]
 blk_mq_flush_plug_list+0x643/0xdc0 block/blk-mq.c:2812
 blk_add_rq_to_plug+0x108/0x3e0 block/blk-mq.c:1294
 blk_mq_submit_bio+0x61a/0xd90 block/blk-mq.c:3008
 __submit_bio+0x11c/0x350 block/blk-core.c:607
 __submit_bio_noacct_mq block/blk-core.c:686 [inline]
 submit_bio_noacct_nocheck+0x4ad/0x5e0 block/blk-core.c:715
 submit_bio_noacct+0x70c/0x8c0 block/blk-core.c:809
 submit_bio+0xb7/0xc0 block/blk-core.c:842
 ext4_io_submit+0x8a/0xa0 fs/ext4/page-io.c:378
 ext4_do_writepages+0xb3a/0x2100 fs/ext4/inode.c:2705
 ext4_writepages+0x15e/0x2e0 fs/ext4/inode.c:2774
 do_writepages+0x1c2/0x340 mm/page-writeback.c:2553
 filemap_fdatawrite_wbc+0xdb/0xf0 mm/filemap.c:387
 __filemap_fdatawrite_range mm/filemap.c:420 [inline]
 __filemap_fdatawrite mm/filemap.c:426 [inline]
 filemap_flush+0x95/0xc0 mm/filemap.c:453
 ext4_alloc_da_blocks+0x50/0x130 fs/ext4/inode.c:3077
 ext4_release_file+0x5f/0x1c0 fs/ext4/file.c:169
 __fput+0x299/0x630 fs/file_table.c:394
 ____fput+0x15/0x20 fs/file_table.c:422
 task_work_run+0x135/0x1a0 kernel/task_work.c:180
 exit_task_work include/linux/task_work.h:38 [inline]
 do_exit+0x604/0x16d0 kernel/exit.c:869
 do_group_exit+0x101/0x150 kernel/exit.c:1018
 get_signal+0xf4e/0x10a0 kernel/signal.c:2904
 arch_do_signal_or_restart+0x95/0x4b0 arch/x86/kernel/signal.c:309
 exit_to_user_mode_loop+0x6f/0xe0 kernel/entry/common.c:168
 exit_to_user_mode_prepare+0x6c/0xb0 kernel/entry/common.c:204
 irqentry_exit_to_user_mode+0x9/0x20 kernel/entry/common.c:309
 irqentry_exit+0x12/0x40 kernel/entry/common.c:412
 asm_exc_page_fault+0x26/0x30 arch/x86/include/asm/idtentry.h:570

read to 0xffff8881018b6010 of 8 bytes by task 2742 on cpu 0:
 req_set_nomerge block/blk.h:351 [inline]
 ll_back_merge_fn+0x29c/0x4a0 block/blk-merge.c:647
 bio_attempt_back_merge+0x58/0x500 block/blk-merge.c:982
 blk_attempt_bio_merge+0x43d/0x480 block/blk-merge.c:1068
 blk_attempt_plug_merge+0xb4/0xf0 block/blk-merge.c:1115
 blk_mq_attempt_bio_merge block/blk-mq.c:2853 [inline]
 blk_mq_get_new_requests block/blk-mq.c:2873 [inline]
 blk_mq_submit_bio+0x3ab/0xd90 block/blk-mq.c:2982
 __submit_bio+0x11c/0x350 block/blk-core.c:607
 __submit_bio_noacct_mq block/blk-core.c:686 [inline]
 submit_bio_noacct_nocheck+0x449/0x5e0 block/blk-core.c:715
 submit_bio_noacct+0x70c/0x8c0 block/blk-core.c:809
 submit_bio+0xb7/0xc0 block/blk-core.c:842
 submit_bh_wbc+0x2ca/0x300 fs/buffer.c:2821
 submit_bh+0x1c/0x20 fs/buffer.c:2826
 jbd2_journal_commit_transaction+0x15f0/0x33a0 fs/jbd2/commit.c:731
 kjournald2+0x242/0x420 fs/jbd2/journal.c:201
 kthread+0x1d7/0x210 kernel/kthread.c:388
 ret_from_fork+0x48/0x60 arch/x86/kernel/process.c:147
 ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:242

value changed: 0x0000000000000000 -> 0xffff888101730680

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 PID: 2742 Comm: jbd2/sda1-8 Not tainted 6.7.0-rc8-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/17/2023
==================================================================

Crashes (4):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/01/03 06:53 upstream 610a9b8f49fb fb427a07 .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
2023/12/05 19:17 upstream bee0e7762ad2 858d62d1 .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
2023/11/30 16:17 upstream 3b47bc037bd4 f819d6f7 .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
2023/11/25 05:49 upstream 0f5cc96c367f 5b429f39 .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.