syzbot


KCSAN: data-race in _prb_read_valid / prb_reserve_in_last (2)

Status: moderation: reported on 2025/07/23 21:02
Subsystems: block mm
[Documentation on labels]
Reported-by: syzbot+08a0b6dcd32b2b2dfcf7@syzkaller.appspotmail.com
First crash: 50d, last: 14d
Similar bugs (1)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in _prb_read_valid / prb_reserve_in_last block 6 5 107d 121d 0/29 auto-obsoleted due to no activity on 2025/07/22 21:45

Sample crash report:
==================================================================
BUG: KCSAN: data-race in _prb_read_valid / prb_reserve_in_last

write to 0xffffffff86875748 of 8 bytes by task 4207 on cpu 1:
 data_realloc kernel/printk/printk_ringbuffer.c:1177 [inline]
 prb_reserve_in_last+0x861/0xb80 kernel/printk/printk_ringbuffer.c:1440
 vprintk_store+0x494/0x860 kernel/printk/printk.c:2300
 vprintk_emit+0x178/0x650 kernel/printk/printk.c:2426
 vprintk_default+0x26/0x30 kernel/printk/printk.c:2465
 vprintk+0x1d/0x30 kernel/printk/printk_safe.c:82
 _printk+0x79/0xa0 kernel/printk/printk.c:2475
 disk_unlock_native_capacity block/partitions/core.c:520 [inline]
 blk_add_partition block/partitions/core.c:543 [inline]
 blk_add_partitions block/partitions/core.c:633 [inline]
 bdev_disk_changed+0x950/0xcb0 block/partitions/core.c:693
 loop_reread_partitions drivers/block/loop.c:443 [inline]
 loop_set_status+0x567/0x640 drivers/block/loop.c:1268
 loop_set_status64 drivers/block/loop.c:1364 [inline]
 lo_ioctl+0x654/0x1240 drivers/block/loop.c:1550
 blkdev_ioctl+0x34f/0x440 block/ioctl.c:705
 vfs_ioctl fs/ioctl.c:51 [inline]
 __do_sys_ioctl fs/ioctl.c:598 [inline]
 __se_sys_ioctl+0xce/0x140 fs/ioctl.c:584
 __x64_sys_ioctl+0x43/0x50 fs/ioctl.c:584
 x64_sys_call+0x1816/0x2ff0 arch/x86/include/generated/asm/syscalls_64.h:17
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0xd2/0x200 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

read to 0xffffffff86875740 of 16 bytes by task 2982 on cpu 0:
 desc_read kernel/printk/printk_ringbuffer.c:482 [inline]
 desc_read_finalized_seq kernel/printk/printk_ringbuffer.c:1874 [inline]
 prb_read kernel/printk/printk_ringbuffer.c:1922 [inline]
 _prb_read_valid+0x1bc/0x920 kernel/printk/printk_ringbuffer.c:2113
 prb_read_valid+0x3c/0x60 kernel/printk/printk_ringbuffer.c:2185
 syslog_print+0xeb/0x540 kernel/printk/printk.c:1633
 do_syslog+0x52b/0x7e0 kernel/printk/printk.c:1785
 __do_sys_syslog kernel/printk/printk.c:1877 [inline]
 __se_sys_syslog kernel/printk/printk.c:1875 [inline]
 __x64_sys_syslog+0x41/0x50 kernel/printk/printk.c:1875
 x64_sys_call+0x2f36/0x2ff0 arch/x86/include/generated/asm/syscalls_64.h:104
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0xd2/0x200 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 UID: 0 PID: 2982 Comm: klogd Not tainted syzkaller #0 PREEMPT(voluntary) 
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/12/2025
==================================================================

Crashes (7):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/08/28 12:24 upstream 07d9df80082b e12e5ba4 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in _prb_read_valid / prb_reserve_in_last
2025/08/19 13:15 upstream be48bcf004f9 254a27c1 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in _prb_read_valid / prb_reserve_in_last
2025/08/13 16:17 upstream 8742b2d8935f 22ec1469 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in _prb_read_valid / prb_reserve_in_last
2025/08/12 05:09 upstream 53e760d89498 c06e8995 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in _prb_read_valid / prb_reserve_in_last
2025/08/11 00:50 upstream 8f5ae30d69d7 32a0e5ed .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in _prb_read_valid / prb_reserve_in_last
2025/07/28 10:35 upstream 038d61fd6422 fb8f743d .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in _prb_read_valid / prb_reserve_in_last
2025/07/23 21:01 upstream 01a412d06bc5 e1dd4f22 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in _prb_read_valid / prb_reserve_in_last
* Struck through repros no longer work on HEAD.