KCSAN: data-race in dd_has_work / dd_insert_requests

12 views
Skip to first unread message

syzbot

unread,
Oct 8, 2019, 6:29:09 PM10/8/19
to syzkaller-upst...@googlegroups.com
Hello,

syzbot found the following crash on:

HEAD commit: b4bd9343 x86, kcsan: Enable KCSAN for x86
git tree: https://github.com/google/ktsan.git kcsan
console output: https://syzkaller.appspot.com/x/log.txt?x=161438c3600000
kernel config: https://syzkaller.appspot.com/x/.config?x=c0906aa620713d80
dashboard link: https://syzkaller.appspot.com/bug?extid=d0a56f61891ba5f27b54
compiler: gcc (GCC) 9.0.0 20181231 (experimental)
CC: [ax...@kernel.dk linux...@vger.kernel.org
linux-...@vger.kernel.org el...@google.com]

Unfortunately, I don't have any reproducer for this crash yet.

IMPORTANT: if you fix the bug, please add the following tag to the commit:
Reported-by: syzbot+d0a56f...@syzkaller.appspotmail.com

==================================================================
BUG: KCSAN: data-race in dd_has_work / dd_insert_requests

read to 0xffff88812a33bf18 of 8 bytes by interrupt on cpu 1:
list_empty_careful include/linux/list.h:287 [inline]
dd_has_work+0xb6/0x100 block/mq-deadline.c:584
blk_mq_sched_has_work block/blk-mq-sched.h:78 [inline]
blk_mq_hctx_has_pending block/blk-mq.c:70 [inline]
blk_mq_run_hw_queue+0x1a3/0x1c0 block/blk-mq.c:1488
blk_mq_run_hw_queues+0xac/0xf0 block/blk-mq.c:1509
scsi_end_request+0x3bd/0x3e0 drivers/scsi/scsi_lib.c:619
scsi_io_completion+0x11d/0xc80 drivers/scsi/scsi_lib.c:963
scsi_finish_command+0x280/0x380 drivers/scsi/scsi.c:228
scsi_softirq_done+0x259/0x280 drivers/scsi/scsi_lib.c:1465
blk_done_softirq+0x1eb/0x250 block/blk-softirq.c:37
__do_softirq+0x115/0x33f kernel/softirq.c:292
invoke_softirq kernel/softirq.c:373 [inline]
irq_exit+0xbb/0xe0 kernel/softirq.c:413
exiting_irq arch/x86/include/asm/apic.h:537 [inline]
do_IRQ+0xdf/0x150 arch/x86/kernel/irq.c:259
ret_from_intr+0x0/0x19
arch_local_irq_restore arch/x86/include/asm/paravirt.h:768 [inline]
__kcsan_setup_watchpoint+0x272/0x500 kernel/kcsan/core.c:470
__tsan_read8 kernel/kcsan/kcsan.c:31 [inline]
__tsan_read8+0x2c/0x30 kernel/kcsan/kcsan.c:31

write to 0xffff88812a33bf18 of 8 bytes by task 8144 on cpu 0:
__list_add include/linux/list.h:63 [inline]
__list_add include/linux/list.h:56 [inline]
list_add_tail include/linux/list.h:93 [inline]
dd_insert_request block/mq-deadline.c:529 [inline]
dd_insert_requests+0x4a4/0x5a0 block/mq-deadline.c:545
blk_mq_sched_insert_requests+0x134/0x2e0 block/blk-mq-sched.c:429
blk_mq_flush_plug_list+0x572/0x6c0 block/blk-mq.c:1756
blk_flush_plug_list+0x271/0x2a0 block/blk-core.c:1728
blk_finish_plug block/blk-core.c:1745 [inline]
blk_finish_plug+0x60/0x84 block/blk-core.c:1741
read_pages+0xbc/0x2d0 mm/readahead.c:142
__do_page_cache_readahead+0x353/0x390 mm/readahead.c:212
ra_submit mm/internal.h:62 [inline]
ondemand_readahead+0x35d/0x710 mm/readahead.c:492
page_cache_sync_readahead+0x1ad/0x1e0 mm/readahead.c:527
generic_file_buffered_read mm/filemap.c:2071 [inline]
generic_file_read_iter+0xeb6/0x1440 mm/filemap.c:2344
ext4_file_read_iter fs/ext4/file.c:77 [inline]
ext4_file_read_iter+0xfa/0x240 fs/ext4/file.c:65
call_read_iter include/linux/fs.h:1864 [inline]
generic_file_splice_read+0x35c/0x500 fs/splice.c:307
do_splice_to+0xf2/0x130 fs/splice.c:877

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 PID: 8144 Comm: syz-executor.5 Not tainted 5.3.0+ #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS
Google 01/01/2011
==================================================================


---
This bug is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzk...@googlegroups.com.

syzbot will keep track of this bug report. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.

syzbot

unread,
Mar 31, 2021, 2:09:08 AM3/31/21
to syzkaller-upst...@googlegroups.com
Auto-closing this bug as obsolete.
Crashes did not happen for a while, no reproducer and no activity.
Reply all
Reply to author
Forward
0 new messages