syzbot


KCSAN: data-race in blk_mq_request_bypass_insert / blk_mq_run_hw_queue

Status: closed as invalid on 2020/06/18 14:24
Subsystems: block
[Documentation on labels]
First crash: 1467d, last: 1409d
Similar bugs (1)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in blk_mq_request_bypass_insert / blk_mq_run_hw_queue (2) block 434 711d 1328d 0/26 auto-closed as invalid on 2022/06/19 16:38

Sample crash report:
==================================================================
BUG: KCSAN: data-race in blk_mq_request_bypass_insert / blk_mq_run_hw_queue

write to 0xffff8881292efc10 of 8 bytes by task 3442 on cpu 0:
 __list_add include/linux/list.h:70 [inline]
 __list_add include/linux/list.h:63 [inline]
 list_add include/linux/list.h:86 [inline]
 blk_mq_request_bypass_insert+0x193/0x1f0 block/blk-mq.c:1694
 blk_mq_sched_insert_request+0x374/0x3c0 block/blk-mq-sched.c:423
 blk_mq_requeue_work+0x349/0x440 block/blk-mq.c:746
 process_one_work+0x424/0x930 kernel/workqueue.c:2268
 worker_thread+0x9a/0x7e0 kernel/workqueue.c:2414
 kthread+0x203/0x230 kernel/kthread.c:268
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:352

read to 0xffff8881292efc10 of 8 bytes by interrupt on cpu 1:
 list_empty_careful include/linux/list.h:301 [inline]
 blk_mq_hctx_has_pending block/blk-mq.c:69 [inline]
 blk_mq_run_hw_queue+0x10a/0x1b0 block/blk-mq.c:1515
 blk_mq_run_hw_queues+0xa2/0xe0 block/blk-mq.c:1537
 scsi_end_request+0x343/0x360 drivers/scsi/scsi_lib.c:615
 scsi_io_completion+0x11e/0xcc0 drivers/scsi/scsi_lib.c:959
 scsi_finish_command+0x283/0x390 drivers/scsi/scsi.c:214
 scsi_softirq_done+0x249/0x270 drivers/scsi/scsi_lib.c:1454
 blk_done_softirq+0x1e6/0x250 block/blk-softirq.c:37
 __do_softirq+0x118/0x34a kernel/softirq.c:292
 invoke_softirq kernel/softirq.c:373 [inline]
 irq_exit+0xb5/0xd0 kernel/softirq.c:413
 exiting_irq arch/x86/include/asm/apic.h:546 [inline]
 do_IRQ+0x7b/0x120 arch/x86/kernel/irq.c:263
 ret_from_intr+0x0/0x21
 __read_once_size+0x2/0xd0 include/linux/compiler.h:230
 arch_atomic_read arch/x86/include/asm/atomic.h:31 [inline]
 atomic_read include/asm-generic/atomic-instrumented.h:28 [inline]
 atomic_fetch_add_unless include/linux/atomic-fallback.h:1088 [inline]
 atomic_add_unless include/linux/atomic-fallback.h:1113 [inline]
 page_ref_add_unless include/linux/page_ref.h:166 [inline]
 __page_cache_add_speculative include/linux/pagemap.h:184 [inline]
 page_cache_get_speculative include/linux/pagemap.h:200 [inline]
 find_get_pages_range_tag+0x19c/0x700 mm/filemap.c:1922
 pagevec_lookup_range_tag+0x43/0x70 mm/swap.c:1078
 mpage_prepare_extent_to_map+0x1bf/0x6e0 fs/ext4/inode.c:2546
 ext4_writepages+0x5a1/0x1e10 fs/ext4/inode.c:2723
 do_writepages+0x6b/0x170 mm/page-writeback.c:2344
 __filemap_fdatawrite_range+0x1bb/0x220 mm/filemap.c:421
 file_write_and_wait_range+0xfb/0x160 mm/filemap.c:760
 ext4_sync_file+0x26e/0x8b0 fs/ext4/fsync.c:153
 vfs_fsync_range+0x7c/0x150 fs/sync.c:197
 generic_write_sync include/linux/fs.h:2872 [inline]
 ext4_buffered_write_iter+0x211/0x280 fs/ext4/file.c:277
 ext4_file_write_iter+0xf4/0xd30 fs/ext4/file.c:642
 call_write_iter include/linux/fs.h:1907 [inline]
 do_iter_readv_writev+0x4a7/0x5d0 fs/read_write.c:694
 do_iter_write fs/read_write.c:999 [inline]
 do_iter_write+0x137/0x3a0 fs/read_write.c:980
 vfs_iter_write+0x56/0x80 fs/read_write.c:1040
 iter_file_splice_write+0x530/0x830 fs/splice.c:760
 do_splice_from fs/splice.c:863 [inline]
 direct_splice_actor+0x97/0xb0 fs/splice.c:1037
 splice_direct_to_actor+0x22f/0x540 fs/splice.c:992
 do_splice_direct+0x152/0x1d0 fs/splice.c:1080
 do_sendfile+0x380/0x800 fs/read_write.c:1521
 __do_sys_sendfile64 fs/read_write.c:1582 [inline]
 __se_sys_sendfile64 fs/read_write.c:1568 [inline]
 __x64_sys_sendfile64+0x121/0x140 fs/read_write.c:1568
 do_syscall_64+0xc7/0x3b0 arch/x86/entry/common.c:295
 entry_SYSCALL_64_after_hwframe+0x44/0xa9

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

Crashes (17):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2020/06/16 13:25 https://github.com/google/ktsan.git kcsan 7c3cd68e5d38 4ea9d964 .config console log report ci2-upstream-kcsan-gce
2020/06/14 12:11 https://github.com/google/ktsan.git kcsan 7c3cd68e5d38 2a22c77a .config console log report ci2-upstream-kcsan-gce
2020/06/10 08:57 https://github.com/google/ktsan.git kcsan 7c3cd68e5d38 860c4de9 .config console log report ci2-upstream-kcsan-gce
2020/06/06 01:32 https://github.com/google/ktsan.git kcsan 7c3cd68e5d38 c3e9afb3 .config console log report ci2-upstream-kcsan-gce
2020/05/31 19:04 https://github.com/google/ktsan.git kcsan 7c3cd68e5d38 a0331e89 .config console log report ci2-upstream-kcsan-gce
2020/05/22 03:21 https://github.com/google/ktsan.git kcsan 7c3cd68e5d38 4afdfa20 .config console log report ci2-upstream-kcsan-gce
2020/05/16 03:03 https://github.com/google/ktsan.git kcsan 7c3cd68e5d38 37bccd4e .config console log report ci2-upstream-kcsan-gce
2020/05/11 08:11 https://github.com/google/ktsan.git kcsan 7c3cd68e5d38 f8f57555 .config console log report ci2-upstream-kcsan-gce
2020/05/10 12:56 https://github.com/google/ktsan.git kcsan 7c3cd68e5d38 8742a2b9 .config console log report ci2-upstream-kcsan-gce
2020/05/09 08:14 https://github.com/google/ktsan.git kcsan 7c3cd68e5d38 e97b06d3 .config console log report ci2-upstream-kcsan-gce
2020/05/03 22:02 https://github.com/google/ktsan.git kcsan 7c3cd68e5d38 58ae5e18 .config console log report ci2-upstream-kcsan-gce
2020/05/01 10:29 https://github.com/google/ktsan.git kcsan 7c3cd68e5d38 143a10e9 .config console log report ci2-upstream-kcsan-gce
2020/04/30 11:08 https://github.com/google/ktsan.git kcsan 7c3cd68e5d38 3698959a .config console log report ci2-upstream-kcsan-gce
2020/04/29 05:47 https://github.com/google/ktsan.git kcsan 7c3cd68e5d38 e3ecea2e .config console log report ci2-upstream-kcsan-gce
2020/04/27 02:36 https://github.com/google/ktsan.git kcsan 7c3cd68e5d38 0ce7569e .config console log report ci2-upstream-kcsan-gce
2020/04/21 21:36 https://github.com/google/ktsan.git kcsan 7c3cd68e5d38 f20434a8 .config console log report ci2-upstream-kcsan-gce
2020/04/19 11:12 https://github.com/google/ktsan.git kcsan 7c3cd68e5d38 6dfd45e1 .config console log report ci2-upstream-kcsan-gce
* Struck through repros no longer work on HEAD.