syzbot


KCSAN: data-race in __bio_queue_enter / blk_mq_unfreeze_queue

Status: auto-closed as invalid on 2021/12/18 22:19
Reported-by: syzbot+@syzkaller.appspotmail.com
First crash: 379d, last: 379d
similar bugs (4):
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in __bio_queue_enter / blk_mq_unfreeze_queue (5) 1 47d 47d 0/24 auto-obsoleted due to no activity on 2022/11/15 22:27
upstream KCSAN: data-race in __bio_queue_enter / blk_mq_unfreeze_queue (3) 1 260d 260d 0/24 auto-closed as invalid on 2022/04/17 09:14
upstream KCSAN: data-race in __bio_queue_enter / blk_mq_unfreeze_queue (4) 11 97d 219d 0/24 auto-closed as invalid on 2022/09/26 17:17
upstream KCSAN: data-race in __bio_queue_enter / blk_mq_unfreeze_queue (2) 4 310d 320d 0/24 auto-closed as invalid on 2022/02/26 09:45

Sample crash report:
==================================================================
BUG: KCSAN: data-race in __bio_queue_enter / blk_mq_unfreeze_queue

write to 0xffff888101838ccc of 4 bytes by task 2225 on cpu 0:
 __blk_mq_unfreeze_queue block/blk-mq.c:223 [inline]
 blk_mq_unfreeze_queue+0x3c/0xc0 block/blk-mq.c:234
 loop_set_status+0x487/0x5d0 drivers/block/loop.c:1300
 lo_ioctl+0x785/0x1270
 blkdev_ioctl+0x20e/0x440 block/ioctl.c:597
 vfs_ioctl fs/ioctl.c:51 [inline]
 __do_sys_ioctl fs/ioctl.c:874 [inline]
 __se_sys_ioctl+0xcb/0x140 fs/ioctl.c:860
 __x64_sys_ioctl+0x3f/0x50 fs/ioctl.c:860
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x44/0xd0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x44/0xae

read to 0xffff888101838ccc of 4 bytes by task 1910 on cpu 1:
 __bio_queue_enter+0x1ea/0x500 block/blk-core.c:441
 bio_queue_enter block/blk.h:91 [inline]
 blk_mq_get_new_requests block/blk-mq.c:2523 [inline]
 blk_mq_get_request block/blk-mq.c:2572 [inline]
 blk_mq_submit_bio+0x2fa/0x1390 block/blk-mq.c:2609
 __submit_bio+0x131/0x340 block/blk-core.c:851
 __submit_bio_noacct_mq block/blk-core.c:926 [inline]
 submit_bio_noacct+0x418/0x4e0 block/blk-core.c:952
 submit_bio+0x10c/0x180
 mpage_bio_submit fs/mpage.c:66 [inline]
 mpage_readahead+0x27d/0x2c0 fs/mpage.c:393
 blkdev_readahead+0x18/0x20 block/fops.c:401
 read_pages+0xba/0x5f0 mm/readahead.c:129
 page_cache_ra_unbounded+0x3d2/0x430 mm/readahead.c:238
 do_page_cache_ra mm/readahead.c:268 [inline]
 force_page_cache_ra+0x1e6/0x220 mm/readahead.c:300
 page_cache_sync_ra+0xcc/0xe0 mm/readahead.c:574
 page_cache_sync_readahead include/linux/pagemap.h:980 [inline]
 filemap_get_pages mm/filemap.c:2556 [inline]
 filemap_read+0x3eb/0x16d0 mm/filemap.c:2642
 generic_file_read_iter+0x72/0x2a0 mm/filemap.c:2792
 blkdev_read_iter+0x96/0x140 block/fops.c:583
 call_read_iter include/linux/fs.h:2156 [inline]
 new_sync_read fs/read_write.c:400 [inline]
 vfs_read+0x66c/0x750 fs/read_write.c:481
 ksys_read+0xd9/0x190 fs/read_write.c:619
 __do_sys_read fs/read_write.c:629 [inline]
 __se_sys_read fs/read_write.c:627 [inline]
 __x64_sys_read+0x3e/0x50 fs/read_write.c:627
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x44/0xd0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x44/0xae

value changed: 0x00000001 -> 0x00000000

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 1910 Comm: udevd Not tainted 5.15.0-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
==================================================================
udevd[1910]: inotify_add_watch(7, /dev/loop2p1, 10) failed: No such file or directory
udevd[1910]: inotify_add_watch(7, /dev/loop2p1, 10) failed: No such file or directory

Crashes (1):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci2-upstream-kcsan-gce 2021/11/13 22:17 upstream a9b9669d9822 75b04091 .config log report info KCSAN: data-race in __bio_queue_enter / blk_mq_unfreeze_queue
* Struck through repros no longer work on HEAD.