syzbot


KCSAN: data-race in dev_uevent / really_probe (6)

Status: auto-obsoleted due to no activity on 2024/06/02 22:19
Subsystems: kernel
[Documentation on labels]
Reported-by: syzbot+ffa8143439596313a85a@syzkaller.appspotmail.com
First crash: 284d, last: 194d
Discussions (3)
Title Replies (including bot) Last reply
[PATCH v2] drivers: core: synchronize really_probe() and dev_uevent() 3 (3) 2024/07/12 08:56
[PATCH] drivers: core: Make dev->driver usage safe in dev_uevent() 10 (10) 2024/05/06 06:04
data-race in dev_uevent / really_probe? 1 (1) 2024/04/26 15:53
Similar bugs (5)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in dev_uevent / really_probe kernel 1 1645d 1645d 0/28 auto-closed as invalid on 2020/06/18 13:13
upstream KCSAN: data-race in dev_uevent / really_probe (2) kernel 3 1564d 1578d 0/28 auto-closed as invalid on 2020/09/01 14:47
upstream KCSAN: data-race in dev_uevent / really_probe (5) kernel 1 402d 402d 0/28 auto-obsoleted due to no activity on 2023/11/07 12:48
upstream KCSAN: data-race in dev_uevent / really_probe (4) kernel 5 1320d 1376d 0/28 auto-closed as invalid on 2021/05/17 10:55
upstream KCSAN: data-race in dev_uevent / really_probe (3) kernel 13 1415d 1432d 0/28 auto-closed as invalid on 2021/01/28 09:10

Sample crash report:
==================================================================
BUG: KCSAN: data-race in dev_uevent / really_probe

write to 0xffff88811759c468 of 8 bytes by task 3902 on cpu 0:
 really_probe+0x9a/0x5d0 drivers/base/dd.c:631
 __driver_probe_device+0x12d/0x200 drivers/base/dd.c:798
 driver_probe_device+0x38/0x2f0 drivers/base/dd.c:828
 __device_attach_driver+0x216/0x320 drivers/base/dd.c:956
 bus_for_each_drv+0x1cd/0x240 drivers/base/bus.c:457
 __device_attach+0x1c7/0x290 drivers/base/dd.c:1028
 device_initial_probe+0x1a/0x20 drivers/base/dd.c:1077
 bus_probe_device+0x141/0x1d0 drivers/base/bus.c:532
 device_add+0x651/0x800 drivers/base/core.c:3720
 device_register+0x1d/0x30 drivers/base/core.c:3802
 nsim_bus_dev_new drivers/net/netdevsim/bus.c:442 [inline]
 new_device_store+0x27a/0x470 drivers/net/netdevsim/bus.c:173
 bus_attr_store+0x54/0x70 drivers/base/bus.c:170
 sysfs_kf_write+0xae/0xd0 fs/sysfs/file.c:136
 kernfs_fop_write_iter+0x1ce/0x2c0 fs/kernfs/file.c:334
 call_write_iter include/linux/fs.h:2110 [inline]
 new_sync_write fs/read_write.c:497 [inline]
 vfs_write+0x771/0x8e0 fs/read_write.c:590
 ksys_write+0xeb/0x1b0 fs/read_write.c:643
 __do_sys_write fs/read_write.c:655 [inline]
 __se_sys_write fs/read_write.c:652 [inline]
 __x64_sys_write+0x42/0x50 fs/read_write.c:652
 x64_sys_call+0x27b7/0x2d30 arch/x86/include/generated/asm/syscalls_64.h:2
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0xcd/0x1d0 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

read to 0xffff88811759c468 of 8 bytes by task 3901 on cpu 1:
 dev_uevent+0x235/0x380 drivers/base/core.c:2670
 uevent_show+0x10c/0x1f0 drivers/base/core.c:2742
 dev_attr_show+0x3a/0xa0 drivers/base/core.c:2445
 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
 call_read_iter include/linux/fs.h:2104 [inline]
 new_sync_read fs/read_write.c:395 [inline]
 vfs_read+0x5bc/0x6b0 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+0x27ad/0x2d30 arch/x86/include/generated/asm/syscalls_64.h:1
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0xcd/0x1d0 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

value changed: 0x0000000000000000 -> 0xffffffff862d4ad0

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 3901 Comm: udevd Not tainted 6.9.0-rc6-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/27/2024
==================================================================

Crashes (9):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/04/28 22:18 upstream e67572cd2204 07b455f9 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in dev_uevent / really_probe
2024/04/06 22:22 upstream f2f80ac80987 ca620dd8 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in dev_uevent / really_probe
2024/03/26 08:42 upstream 928a87efa423 bcd9b39f .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in dev_uevent / really_probe
2024/03/22 06:59 upstream ebc9bee8814d 7a239ce7 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in dev_uevent / really_probe
2024/03/20 22:06 upstream a4145ce1e7bc 5b7d42ae .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in dev_uevent / really_probe
2024/03/20 11:43 upstream a4145ce1e7bc a485f239 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in dev_uevent / really_probe
2024/03/05 23:01 upstream 29cd507cbec2 f39a7eed .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in dev_uevent / really_probe
2024/02/06 01:05 upstream 54be6c6c5ae8 6404acf9 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in dev_uevent / really_probe
2024/01/29 18:52 upstream 41bccc98fb79 991a98f4 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in dev_uevent / really_probe
* Struck through repros no longer work on HEAD.