syzbot


KCSAN: data-race in bdev_set_nr_sectors / blkdev_read_iter (2)

Status: auto-obsoleted due to no activity on 2023/11/24 04:57
Subsystems: block
[Documentation on labels]
First crash: 681d, last: 681d
Similar bugs (2)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in bdev_set_nr_sectors / blkdev_read_iter block 6 1 802d 802d 0/29 auto-obsoleted due to no activity on 2023/07/25 06:34
upstream KCSAN: data-race in bdev_set_nr_sectors / blkdev_read_iter (3) block 6 1 599d 599d 0/29 auto-obsoleted due to no activity on 2024/02/13 06:51

Sample crash report:
I/O error, dev loop1, sector 0 op 0x0:(READ) flags 0x80700 phys_seg 1 prio class 2
==================================================================
BUG: KCSAN: data-race in bdev_set_nr_sectors / blkdev_read_iter

write to 0xffff888100480c88 of 8 bytes by task 21129 on cpu 1:
 bdev_set_nr_sectors+0x50/0x70 block/bdev.c:422
 set_capacity block/genhd.c:61 [inline]
 set_capacity_and_notify+0x6e/0x170 block/genhd.c:74
 loop_set_size+0x2e/0x70 drivers/block/loop.c:237
 loop_configure+0xaf9/0xca0 drivers/block/loop.c:1100
 lo_ioctl+0x682/0x12e0
 blkdev_ioctl+0x375/0x460 block/ioctl.c:630
 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:50 [inline]
 do_syscall_64+0x41/0xc0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x63/0xcd

read to 0xffff888100480c88 of 8 bytes by task 10907 on cpu 0:
 bdev_nr_sectors include/linux/blkdev.h:767 [inline]
 bdev_nr_bytes include/linux/blkdev.h:772 [inline]
 blkdev_read_iter+0x58/0x2c0 block/fops.c:696
 call_read_iter include/linux/fs.h:1950 [inline]
 new_sync_read fs/read_write.c:389 [inline]
 vfs_read+0x3da/0x5c0 fs/read_write.c:470
 ksys_read+0xeb/0x1a0 fs/read_write.c:613
 __do_sys_read fs/read_write.c:623 [inline]
 __se_sys_read fs/read_write.c:621 [inline]
 __x64_sys_read+0x42/0x50 fs/read_write.c:621
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x41/0xc0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x63/0xcd

value changed: 0x0000000000000000 -> 0x00000000000000a4

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 PID: 10907 Comm: udevd Not tainted 6.6.0-rc6-syzkaller-00182-gce55c22ec8b2 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/06/2023
==================================================================
I/O error, dev loop1, sector 0 op 0x0:(READ) flags 0x80700 phys_seg 1 prio class 2
I/O error, dev loop3, sector 0 op 0x0:(READ) flags 0x80700 phys_seg 1 prio class 2
I/O error, dev loop2, sector 0 op 0x0:(READ) flags 0x80700 phys_seg 1 prio class 2

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/10/20 04:51 upstream ce55c22ec8b2 a42250d2 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in bdev_set_nr_sectors / blkdev_read_iter
* Struck through repros no longer work on HEAD.