syzbot


KCSAN: data-race in block_uevent / inc_diskseq (2)

Status: upstream: reported on 2024/06/19 12:27
Subsystems: block
[Documentation on labels]
Reported-by: syzbot+c147f9175ec6cc7bd73b@syzkaller.appspotmail.com
First crash: 24d, last: 10d
Discussions (1)
Title Replies (including bot) Last reply
[syzbot] [block?] KCSAN: data-race in block_uevent / inc_diskseq (2) 2 (3) 2024/06/19 18:49
Similar bugs (1)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in block_uevent / inc_diskseq block 37 121d 217d 0/27 auto-obsoleted due to no activity on 2024/04/18 10:08

Sample crash report:
==================================================================
BUG: KCSAN: data-race in block_uevent / inc_diskseq

write to 0xffff888101059e20 of 8 bytes by task 3437 on cpu 0:
 inc_diskseq+0x2c/0x40 block/genhd.c:1472
 disk_force_media_change+0x9f/0xf0 block/disk-events.c:297
 __loop_clr_fd+0x270/0x3f0 drivers/block/loop.c:1193
 loop_clr_fd drivers/block/loop.c:1276 [inline]
 lo_ioctl+0xea6/0x1330 drivers/block/loop.c:1578
 blkdev_ioctl+0x35f/0x450 block/ioctl.c:676
 vfs_ioctl fs/ioctl.c:51 [inline]
 __do_sys_ioctl fs/ioctl.c:907 [inline]
 __se_sys_ioctl+0xd3/0x150 fs/ioctl.c:893
 __x64_sys_ioctl+0x43/0x50 fs/ioctl.c:893
 x64_sys_call+0x1581/0x2d70 arch/x86/include/generated/asm/syscalls_64.h:17
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0xc9/0x1c0 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

read to 0xffff888101059e20 of 8 bytes by task 3341 on cpu 1:
 block_uevent+0x31/0x50 block/genhd.c:1206
 dev_uevent+0x2f3/0x380 drivers/base/core.c:2687
 uevent_show+0x11e/0x210 drivers/base/core.c:2745
 dev_attr_show+0x3a/0xa0 drivers/base/core.c:2437
 sysfs_kf_seq_show+0x17c/0x250 fs/sysfs/file.c:59
 kernfs_seq_show+0x7c/0x90 fs/kernfs/file.c:205
 seq_read_iter+0x2d7/0x940 fs/seq_file.c:230
 kernfs_fop_read_iter+0xc6/0x310 fs/kernfs/file.c:279
 new_sync_read fs/read_write.c:395 [inline]
 vfs_read+0x5e9/0x6e0 fs/read_write.c:476
 ksys_read+0xeb/0x1b0 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+0x42/0x50 fs/read_write.c:627
 x64_sys_call+0x27e5/0x2d70 arch/x86/include/generated/asm/syscalls_64.h:1
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0xc9/0x1c0 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

value changed: 0x0000000000000012 -> 0x0000000000000014

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 3341 Comm: udevd Not tainted 6.10.0-rc6-syzkaller-00051-g1dfe225e9af5 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/07/2024
==================================================================

Crashes (2):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/07/02 18:12 upstream 1dfe225e9af5 07f0a0a0 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in block_uevent / inc_diskseq
2024/06/19 00:43 upstream 3d54351c64e8 639d6cdf .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in block_uevent / inc_diskseq
* Struck through repros no longer work on HEAD.