syzbot


KCSAN: data-race in __pm_runtime_resume / __update_runtime_status

Status: moderation: reported on 2024/09/22 21:06
Subsystems: pm
[Documentation on labels]
Reported-by: syzbot+bc4ea807cbc20a6f0de2@syzkaller.appspotmail.com
First crash: 12d, last: 12d

Sample crash report:
==================================================================
BUG: KCSAN: data-race in __pm_runtime_resume / __update_runtime_status

write to 0xffff88810213626c of 4 bytes by task 3775 on cpu 1:
 __update_runtime_status+0xef/0x1d0 drivers/base/power/runtime.c:98
 rpm_suspend+0x58c/0x1020 drivers/base/power/runtime.c:667
 __pm_runtime_suspend+0xf1/0x210 drivers/base/power/runtime.c:1142
 pm_runtime_autosuspend include/linux/pm_runtime.h:342 [inline]
 usb_runtime_idle+0x42/0x50 drivers/usb/core/driver.c:2005
 rpm_idle+0x533/0x8a0 drivers/base/power/runtime.c:524
 pm_runtime_work+0x105/0x130 drivers/base/power/runtime.c:970
 process_one_work kernel/workqueue.c:3229 [inline]
 process_scheduled_works+0x483/0x9a0 kernel/workqueue.c:3310
 worker_thread+0x51d/0x6f0 kernel/workqueue.c:3391
 kthread+0x1d1/0x210 kernel/kthread.c:389
 ret_from_fork+0x4b/0x60 arch/x86/kernel/process.c:147
 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244

read to 0xffff88810213626c of 4 bytes by task 4389 on cpu 0:
 __pm_runtime_resume+0x63/0x100 drivers/base/power/runtime.c:1165
 pm_runtime_resume_and_get include/linux/pm_runtime.h:430 [inline]
 usb_autoresume_device+0x25/0xd0 drivers/usb/core/driver.c:1727
 usbdev_open+0xfe/0x480 drivers/usb/core/devio.c:1055
 chrdev_open+0x2f9/0x370 fs/char_dev.c:414
 do_dentry_open+0x621/0xa20 fs/open.c:958
 vfs_open+0x38/0x1f0 fs/open.c:1088
 do_open fs/namei.c:3774 [inline]
 path_openat+0x1ac2/0x1fa0 fs/namei.c:3933
 do_filp_open+0xf7/0x200 fs/namei.c:3960
 do_sys_openat2+0xab/0x120 fs/open.c:1415
 do_sys_open fs/open.c:1430 [inline]
 __do_sys_openat fs/open.c:1446 [inline]
 __se_sys_openat fs/open.c:1441 [inline]
 __x64_sys_openat+0xf3/0x120 fs/open.c:1441
 x64_sys_call+0x1025/0x2d60 arch/x86/include/generated/asm/syscalls_64.h:258
 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: 0x00000000 -> 0x00000003

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 UID: 0 PID: 4389 Comm: syz.4.155 Not tainted 6.11.0-syzkaller-08829-gaf9c191ac2a0 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/06/2024
==================================================================

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/09/22 21:05 upstream af9c191ac2a0 6f888b75 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __pm_runtime_resume / __update_runtime_status
* Struck through repros no longer work on HEAD.