syzbot


KCSAN: data-race in bdev_disk_changed / set_capacity_and_notify

Status: auto-closed as invalid on 2022/10/04 21:55
Subsystems: block
[Documentation on labels]
First crash: 696d, last: 604d
Similar bugs (1)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in bdev_disk_changed / set_capacity_and_notify (2) block 3 530d 567d 0/26 auto-obsoleted due to no activity on 2022/12/17 03:20

Sample crash report:
==================================================================
BUG: KCSAN: data-race in bdev_disk_changed / set_capacity_and_notify

write to 0xffff8881023c66c8 of 8 bytes by task 27257 on cpu 0:
 set_capacity block/genhd.c:64 [inline]
 set_capacity_and_notify+0xab/0x1d0 block/genhd.c:78
 loop_set_size+0x2e/0x70 drivers/block/loop.c:237
 loop_configure+0xb1b/0xc30 drivers/block/loop.c:1100
 lo_ioctl+0x641/0x1290
 blkdev_ioctl+0x20e/0x440 block/ioctl.c:614
 vfs_ioctl fs/ioctl.c:51 [inline]
 __do_sys_ioctl fs/ioctl.c:870 [inline]
 __se_sys_ioctl+0xcb/0x140 fs/ioctl.c:856
 __x64_sys_ioctl+0x3f/0x50 fs/ioctl.c:856
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x2b/0x70 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x63/0xcd

read to 0xffff8881023c66c8 of 8 bytes by task 16797 on cpu 1:
 bdev_nr_sectors include/linux/blkdev.h:790 [inline]
 get_capacity include/linux/blkdev.h:800 [inline]
 bdev_disk_changed+0x1b9/0xc30 block/partitions/core.c:684
 blkdev_get_whole+0x256/0x270 block/bdev.c:684
 blkdev_get_by_dev+0x248/0x650 block/bdev.c:821
 blkdev_open+0xac/0x140 block/fops.c:485
 do_dentry_open+0x51a/0x8b0 fs/open.c:878
 vfs_open+0x43/0x50 fs/open.c:1014
 do_open fs/namei.c:3557 [inline]
 path_openat+0x169d/0x1b00 fs/namei.c:3691
 do_filp_open+0x105/0x220 fs/namei.c:3718
 do_sys_openat2+0xb5/0x2a0 fs/open.c:1311
 do_sys_open fs/open.c:1327 [inline]
 __do_sys_openat fs/open.c:1343 [inline]
 __se_sys_openat fs/open.c:1338 [inline]
 __x64_sys_openat+0xef/0x110 fs/open.c:1338
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x2b/0x70 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x63/0xcd

value changed: 0x0000000000000000 -> 0x0000000000040800

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 16797 Comm: udevd Not tainted 6.0.0-rc3-syzkaller-00007-gdcf8e5633e2e-dirty #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/22/2022
==================================================================
I/O error, dev loop2, sector 0 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 2
Buffer I/O error on dev loop2, logical block 0, async page read
I/O error, dev loop2, sector 0 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 2
Buffer I/O error on dev loop2, logical block 0, async page read
I/O error, dev loop5, sector 0 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 2
Buffer I/O error on dev loop5, logical block 0, async page read
I/O error, dev loop5, sector 0 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 2
Buffer I/O error on dev loop5, logical block 0, async page read
I/O error, dev loop5, sector 0 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 2
Buffer I/O error on dev loop5, logical block 0, async page read
I/O error, dev loop2, sector 0 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 2
Buffer I/O error on dev loop2, logical block 0, async page read
I/O error, dev loop5, sector 0 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 2
Buffer I/O error on dev loop5, logical block 0, async page read

Crashes (15):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2022/08/30 21:46 upstream dcf8e5633e2e 4a380809 .config console log report info [disk image] [vmlinux] ci2-upstream-kcsan-gce KCSAN: data-race in bdev_disk_changed / set_capacity_and_notify
2022/08/22 00:27 upstream e3f259d33c0e 26a13b38 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in bdev_disk_changed / set_capacity_and_notify
2022/08/07 10:35 upstream 1612c382ffbd 88e3a122 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in bdev_disk_changed / set_capacity_and_notify
2022/08/01 05:46 upstream 334c0ef6429f fef302b1 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in bdev_disk_changed / set_capacity_and_notify
2022/07/31 10:50 upstream 6a010258447d fef302b1 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in bdev_disk_changed / set_capacity_and_notify
2022/07/29 17:16 upstream 6e2c0490769e fef302b1 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in bdev_disk_changed / set_capacity_and_notify
2022/07/23 05:34 upstream 4ba1329cbb94 22343af4 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in bdev_disk_changed / set_capacity_and_notify
2022/07/03 03:50 upstream 69cb6c6556ad 1434eec0 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in bdev_disk_changed / set_capacity_and_notify
2022/06/22 13:07 upstream ca1fdab7fd27 0fc5c330 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in bdev_disk_changed / set_capacity_and_notify
2022/06/18 06:11 upstream 462abc9de7a1 8f633d84 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in bdev_disk_changed / set_capacity_and_notify
2022/06/17 11:00 upstream 47700948a4ab cb58b3b2 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in bdev_disk_changed / set_capacity_and_notify
2022/06/16 10:07 upstream 30306f6194ca 1719ee24 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in bdev_disk_changed / set_capacity_and_notify
2022/06/04 17:16 upstream 032dcf09e2bf c8857892 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in bdev_disk_changed / set_capacity_and_notify
2022/05/30 22:44 upstream 2c5ca23f7414 af70c3a9 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in bdev_disk_changed / set_capacity_and_notify
2022/05/30 11:36 upstream b00ed48bb0a7 a46af346 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in bdev_disk_changed / set_capacity_and_notify
* Struck through repros no longer work on HEAD.