syzbot


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

Status: auto-obsoleted due to no activity on 2024/04/17 22:32
Subsystems: block
[Documentation on labels]
Reported-by: syzbot+5831f74b165191ff3d98@syzkaller.appspotmail.com
First crash: 38d, last: 38d
Similar bugs (2)
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 244d 244d 0/26 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 109d 133d 0/26 auto-obsoleted due to no activity on 2024/02/07 06:53

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

write to 0xffff888101e8ceb8 of 8 bytes by task 31028 on cpu 0:
 dd_insert_request block/mq-deadline.c:837 [inline]
 dd_insert_requests+0x4b6/0x670 block/mq-deadline.c:878
 blk_mq_dispatch_plug_list block/blk-mq.c:2772 [inline]
 blk_mq_flush_plug_list+0x647/0xde0 block/blk-mq.c:2822
 blk_add_rq_to_plug+0x102/0x3e0 block/blk-mq.c:1299
 blk_mq_submit_bio+0x93d/0xdb0 block/blk-mq.c:3014
 __submit_bio+0x11c/0x370 block/blk-core.c:619
 __submit_bio_noacct_mq block/blk-core.c:698 [inline]
 submit_bio_noacct_nocheck+0x502/0x6a0 block/blk-core.c:727
 submit_bio_noacct+0x681/0x830 block/blk-core.c:837
 submit_bio+0x218/0x230 block/blk-core.c:879
 ext4_io_submit fs/ext4/page-io.c:378 [inline]
 io_submit_add_bh fs/ext4/page-io.c:419 [inline]
 ext4_bio_write_folio+0x6c0/0x9a0 fs/ext4/page-io.c:563
 mpage_submit_folio fs/ext4/inode.c:1869 [inline]
 mpage_map_and_submit_buffers fs/ext4/inode.c:2115 [inline]
 mpage_map_and_submit_extent fs/ext4/inode.c:2254 [inline]
 ext4_do_writepages+0x139f/0x2100 fs/ext4/inode.c:2679
 ext4_writepages+0x15f/0x2f0 fs/ext4/inode.c:2768
 do_writepages+0x1c6/0x340 mm/page-writeback.c:2553
 filemap_fdatawrite_wbc+0xdb/0x100 mm/filemap.c:388
 __filemap_fdatawrite_range mm/filemap.c:421 [inline]
 __filemap_fdatawrite mm/filemap.c:427 [inline]
 filemap_flush+0x95/0xc0 mm/filemap.c:454
 ext4_alloc_da_blocks+0x50/0x130 fs/ext4/inode.c:3072
 ext4_release_file+0x5f/0x1c0 fs/ext4/file.c:169
 __fput+0x2c1/0x660 fs/file_table.c:422
 ____fput+0x15/0x20 fs/file_table.c:450
 task_work_run+0x13a/0x1a0 kernel/task_work.c:180
 exit_task_work include/linux/task_work.h:38 [inline]
 do_exit+0x5fd/0x1740 kernel/exit.c:878
 do_group_exit+0x102/0x150 kernel/exit.c:1027
 get_signal+0xf53/0x10a0 kernel/signal.c:2907
 arch_do_signal_or_restart+0x95/0x4b0 arch/x86/kernel/signal.c:310
 exit_to_user_mode_loop kernel/entry/common.c:105 [inline]
 exit_to_user_mode_prepare include/linux/entry-common.h:328 [inline]
 irqentry_exit_to_user_mode+0x94/0x130 kernel/entry/common.c:225
 irqentry_exit+0x12/0x50 kernel/entry/common.c:328
 exc_general_protection+0x33d/0x4d0 arch/x86/kernel/traps.c:644
 asm_exc_general_protection+0x26/0x30 arch/x86/include/asm/idtentry.h:617

read to 0xffff888101e8ceb8 of 8 bytes by task 31037 on cpu 1:
 req_set_nomerge block/blk.h:365 [inline]
 ll_back_merge_fn+0x297/0x480 block/blk-merge.c:643
 bio_attempt_back_merge+0x58/0x510 block/blk-merge.c:986
 blk_attempt_bio_merge+0x44f/0x490 block/blk-merge.c:1072
 blk_attempt_plug_merge+0xb5/0x100 block/blk-merge.c:1119
 blk_mq_attempt_bio_merge block/blk-mq.c:2863 [inline]
 blk_mq_submit_bio+0x5d9/0xdb0 block/blk-mq.c:2985
 __submit_bio+0x11c/0x370 block/blk-core.c:619
 __submit_bio_noacct_mq block/blk-core.c:698 [inline]
 submit_bio_noacct_nocheck+0x502/0x6a0 block/blk-core.c:727
 submit_bio_noacct+0x681/0x830 block/blk-core.c:837
 submit_bio+0x218/0x230 block/blk-core.c:879
 ext4_io_submit+0x8a/0xb0 fs/ext4/page-io.c:378
 ext4_do_writepages+0xb3a/0x2100 fs/ext4/inode.c:2699
 ext4_writepages+0x15f/0x2f0 fs/ext4/inode.c:2768
 do_writepages+0x1c6/0x340 mm/page-writeback.c:2553
 filemap_fdatawrite_wbc+0xdb/0x100 mm/filemap.c:388
 __filemap_fdatawrite_range mm/filemap.c:421 [inline]
 __filemap_fdatawrite mm/filemap.c:427 [inline]
 filemap_flush+0x95/0xc0 mm/filemap.c:454
 ext4_alloc_da_blocks+0x50/0x130 fs/ext4/inode.c:3072
 ext4_release_file+0x5f/0x1c0 fs/ext4/file.c:169
 __fput+0x2c1/0x660 fs/file_table.c:422
 ____fput+0x15/0x20 fs/file_table.c:450
 task_work_run+0x13a/0x1a0 kernel/task_work.c:180
 exit_task_work include/linux/task_work.h:38 [inline]
 do_exit+0x5fd/0x1740 kernel/exit.c:878
 do_group_exit+0x102/0x150 kernel/exit.c:1027
 get_signal+0xf53/0x10a0 kernel/signal.c:2907
 arch_do_signal_or_restart+0x95/0x4b0 arch/x86/kernel/signal.c:310
 exit_to_user_mode_loop kernel/entry/common.c:105 [inline]
 exit_to_user_mode_prepare include/linux/entry-common.h:328 [inline]
 irqentry_exit_to_user_mode+0x94/0x130 kernel/entry/common.c:225
 irqentry_exit+0x12/0x50 kernel/entry/common.c:328
 exc_general_protection+0x33d/0x4d0 arch/x86/kernel/traps.c:644
 asm_exc_general_protection+0x26/0x30 arch/x86/include/asm/idtentry.h:617

value changed: 0x0000000000000000 -> 0xffff888102bb4440

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 31037 Comm: syz-executor.1 Not tainted 6.8.0-syzkaller-05562-g61387b8dcf1d #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/29/2024
==================================================================
syz-executor.1 (31037) used greatest stack depth: 9536 bytes left

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/03/13 22:31 upstream 61387b8dcf1d f919f202 .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.