syzbot


KCSAN: data-race in __submit_bio / blk_mq_unfreeze_queue

Status: auto-closed as invalid on 2021/12/12 07:26
Reported-by: syzbot+@syzkaller.appspotmail.com
First crash: 405d, last: 394d

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

write to 0xffff888101c2bccc of 4 bytes by task 14299 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/0xa0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x44/0xae

read to 0xffff888101c2bccc of 4 bytes by task 4115 on cpu 1:
 bio_queue_enter block/blk-core.c:467 [inline]
 __submit_bio+0x198/0x480 block/blk-core.c:867
 __submit_bio_noacct_mq block/blk-core.c:951 [inline]
 submit_bio_noacct+0x418/0x4e0 block/blk-core.c:977
 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+0x16a/0x430 mm/readahead.c:210
 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:930 [inline]
 filemap_get_pages mm/filemap.c:2548 [inline]
 filemap_read+0x3eb/0x16d0 mm/filemap.c:2634
 generic_file_read_iter+0x72/0x2a0 mm/filemap.c:2784
 blkdev_read_iter+0x98/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/0xa0 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: 4115 Comm: udevd Not tainted 5.15.0-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
==================================================================
 loop2: p1 p2 < > p3 p4 < p5 p6 >
loop2: p1 size 749487615 extends beyond EOD, truncated
loop2: p3 size 1912633224 extends beyond EOD, truncated
loop2: p5 size 749487615 extends beyond EOD, truncated
loop2: p6 size 1912633224 extends beyond EOD, truncated
 loop2: p1 p2 < > p3 p4 < p5 p6 >
loop2: p1 size 766264831 extends beyond EOD, truncated
loop2: p3 size 1912633224 extends beyond EOD, truncated
loop2: p5 size 766264831 extends beyond EOD, truncated
loop2: p6 size 1912633224 extends beyond EOD, truncated
udevd[4115]: inotify_add_watch(7, /dev/loop1p1, 10) failed: No such file or directory
udevd[4115]: inotify_add_watch(7, /dev/loop1p1, 10) failed: No such file or directory
udevd[4115]: inotify_add_watch(7, /dev/loop1p1, 10) failed: No such file or directory
udevd[4115]: inotify_add_watch(7, /dev/loop2p2, 10) failed: No such file or directory

Crashes (3):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci2-upstream-kcsan-gce 2021/11/07 07:20 upstream 512b7931ad05 4c1be0be .config log report info KCSAN: data-race in __submit_bio / blk_mq_unfreeze_queue
ci2-upstream-kcsan-gce 2021/11/04 00:36 upstream dcd68326d29b 4c1be0be .config log report info KCSAN: data-race in __submit_bio / blk_mq_unfreeze_queue
ci2-upstream-kcsan-gce 2021/10/27 04:10 upstream d25f27432f80 d50eb50a .config log report info KCSAN: data-race in __submit_bio / blk_mq_unfreeze_queue
* Struck through repros no longer work on HEAD.