syzbot


KCSAN: data-race in lo_ioctl / loop_queue_rq (4)

Status: auto-obsoleted due to no activity on 2024/02/21 17:00
Subsystems: block
[Documentation on labels]
Reported-by: syzbot+df2b8b0a683bf8e3b643@syzkaller.appspotmail.com
First crash: 124d, last: 109d
Similar bugs (3)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in lo_ioctl / loop_queue_rq (3) block 1 659d 659d 0/26 auto-closed as invalid on 2022/08/20 11:36
upstream KCSAN: data-race in lo_ioctl / loop_queue_rq (2) block 1 1105d 1105d 0/26 auto-closed as invalid on 2021/05/31 09:44
upstream KCSAN: data-race in lo_ioctl / loop_queue_rq block 1 1608d 1608d 0/26 auto-closed as invalid on 2020/02/19 07:26

Sample crash report:
==================================================================
BUG: KCSAN: data-race in lo_ioctl / loop_queue_rq

write to 0xffff888100fd6278 of 4 bytes by task 16366 on cpu 1:
 loop_clr_fd drivers/block/loop.c:1252 [inline]
 lo_ioctl+0xe69/0x12e0 drivers/block/loop.c:1559
 blkdev_ioctl+0x375/0x460 block/ioctl.c:636
 vfs_ioctl fs/ioctl.c:51 [inline]
 __do_sys_ioctl fs/ioctl.c:871 [inline]
 __se_sys_ioctl+0xcf/0x140 fs/ioctl.c:857
 __x64_sys_ioctl+0x43/0x50 fs/ioctl.c:857
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0x59/0x120 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x63/0x6b

read to 0xffff888100fd6278 of 4 bytes by task 16371 on cpu 0:
 loop_queue_rq+0x4d/0x650 drivers/block/loop.c:1849
 __blk_mq_issue_directly block/blk-mq.c:2591 [inline]
 blk_mq_request_issue_directly+0x1d0/0x330 block/blk-mq.c:2676
 blk_mq_plug_issue_direct+0x156/0x520 block/blk-mq.c:2697
 blk_mq_flush_plug_list+0x2a7/0xdb0 block/blk-mq.c:2806
 __blk_flush_plug+0x210/0x260 block/blk-core.c:1166
 blk_finish_plug+0x47/0x60 block/blk-core.c:1190
 blkdev_writepages+0x63/0x90 block/fops.c:428
 do_writepages+0x1c2/0x340 mm/page-writeback.c:2553
 filemap_fdatawrite_wbc+0xdb/0xf0 mm/filemap.c:388
 __filemap_fdatawrite_range mm/filemap.c:421 [inline]
 file_write_and_wait_range+0xf4/0x190 mm/filemap.c:779
 blkdev_fsync+0x4e/0xa0 block/fops.c:544
 vfs_fsync_range+0x111/0x120 fs/sync.c:188
 generic_write_sync+0xf2/0x120 include/linux/fs.h:2735
 blkdev_write_iter+0x364/0x390 block/fops.c:715
 call_write_iter include/linux/fs.h:2085 [inline]
 iter_file_splice_write+0x4e0/0x840 fs/splice.c:743
 do_splice_from fs/splice.c:941 [inline]
 direct_splice_actor+0x167/0x2c0 fs/splice.c:1164
 splice_direct_to_actor+0x2fb/0x650 fs/splice.c:1108
 do_splice_direct_actor fs/splice.c:1207 [inline]
 do_splice_direct+0xd7/0x150 fs/splice.c:1233
 do_sendfile+0x377/0x880 fs/read_write.c:1295
 __do_sys_sendfile64 fs/read_write.c:1362 [inline]
 __se_sys_sendfile64 fs/read_write.c:1348 [inline]
 __x64_sys_sendfile64+0x110/0x150 fs/read_write.c:1348
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0x59/0x120 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x63/0x6b

value changed: 0x00000001 -> 0x00000002

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 PID: 16371 Comm: syz-executor.5 Not tainted 6.7.0-syzkaller-09928-g052d534373b7 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/17/2023
==================================================================
I/O error, dev loop7, sector 864 op 0x1:(WRITE) flags 0x800 phys_seg 1 prio class 2
Buffer I/O error on dev loop7, logical block 108, lost async page write
I/O error, dev loop7, sector 856 op 0x1:(WRITE) flags 0x800 phys_seg 1 prio class 2
Buffer I/O error on dev loop7, logical block 107, lost async page write
I/O error, dev loop7, sector 848 op 0x1:(WRITE) flags 0x800 phys_seg 1 prio class 2
Buffer I/O error on dev loop7, logical block 106, lost async page write
I/O error, dev loop7, sector 840 op 0x1:(WRITE) flags 0x800 phys_seg 1 prio class 2
Buffer I/O error on dev loop7, logical block 105, lost async page write
I/O error, dev loop7, sector 832 op 0x1:(WRITE) flags 0x800 phys_seg 1 prio class 2
Buffer I/O error on dev loop7, logical block 104, lost async page write
I/O error, dev loop7, sector 824 op 0x1:(WRITE) flags 0x800 phys_seg 1 prio class 2
Buffer I/O error on dev loop7, logical block 103, lost async page write
I/O error, dev loop7, sector 816 op 0x1:(WRITE) flags 0x800 phys_seg 1 prio class 2
Buffer I/O error on dev loop7, logical block 102, lost async page write
Buffer I/O error on dev loop7, logical block 101, lost async page write

Crashes (2):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/01/17 16:59 upstream 052d534373b7 c9a1c95b .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in lo_ioctl / loop_queue_rq
2024/01/02 09:54 upstream 610a9b8f49fb fb427a07 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in lo_ioctl / loop_queue_rq
* Struck through repros no longer work on HEAD.