syzbot


KCSAN: data-race in rwsem_down_write_slowpath / rwsem_down_write_slowpath

Status: moderation: reported on 2026/01/19 04:38
Subsystems: kernfs
[Documentation on labels]
Reported-by: syzbot+f5e0ba366db50663c2e2@syzkaller.appspotmail.com
First crash: 9d14h, last: 16h14m

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

write to 0xffffc9000168fb80 of 1 bytes by task 15053 on cpu 0:
 rwsem_try_write_lock kernel/locking/rwsem.c:653 [inline]
 rwsem_down_write_slowpath+0x3eb/0xa80 kernel/locking/rwsem.c:1159
 __down_write_common kernel/locking/rwsem.c:1317 [inline]
 __down_write kernel/locking/rwsem.c:1326 [inline]
 down_write+0xab/0xc0 kernel/locking/rwsem.c:1591
 kernfs_remove+0x50/0x70 fs/kernfs/dir.c:1554
 sysfs_remove_group+0x140/0x170 fs/sysfs/group.c:330
 dpm_sysfs_remove+0x81/0x90 drivers/base/power/sysfs.c:834
 device_del+0x13d/0x790 drivers/base/core.c:3853
 netdev_unregister_kobject+0x24d/0x270 net/core/net-sysfs.c:2329
 unregister_netdevice_many_notify+0x1346/0x1710 net/core/dev.c:12431
 unregister_netdevice_many net/core/dev.c:12459 [inline]
 unregister_netdevice_queue+0x1cd/0x200 net/core/dev.c:12273
 unregister_netdevice include/linux/netdevice.h:3405 [inline]
 bond_newlink+0x94/0xb0 drivers/net/bonding/bond_netlink.c:611
 rtnl_newlink_create+0x1e4/0x650 net/core/rtnetlink.c:3840
 __rtnl_newlink net/core/rtnetlink.c:3957 [inline]
 rtnl_newlink+0xf5b/0x1370 net/core/rtnetlink.c:4072
 rtnetlink_rcv_msg+0x64b/0x720 net/core/rtnetlink.c:6958
 netlink_rcv_skb+0x123/0x220 net/netlink/af_netlink.c:2550
 rtnetlink_rcv+0x1c/0x30 net/core/rtnetlink.c:6985
 netlink_unicast_kernel net/netlink/af_netlink.c:1318 [inline]
 netlink_unicast+0x5c0/0x690 net/netlink/af_netlink.c:1344
 netlink_sendmsg+0x5c8/0x6f0 net/netlink/af_netlink.c:1894
 sock_sendmsg_nosec net/socket.c:727 [inline]
 __sock_sendmsg net/socket.c:742 [inline]
 ____sys_sendmsg+0x5af/0x600 net/socket.c:2592
 ___sys_sendmsg+0x195/0x1e0 net/socket.c:2646
 __sys_sendmsg net/socket.c:2678 [inline]
 __do_sys_sendmsg net/socket.c:2683 [inline]
 __se_sys_sendmsg net/socket.c:2681 [inline]
 __x64_sys_sendmsg+0xd4/0x160 net/socket.c:2681
 x64_sys_call+0x17ba/0x3000 arch/x86/include/generated/asm/syscalls_64.h:47
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0xc0/0x2a0 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

read to 0xffffc9000168fb80 of 1 bytes by task 12788 on cpu 1:
 rwsem_down_write_slowpath+0x45e/0xa80 kernel/locking/rwsem.c:1177
 __down_write_common kernel/locking/rwsem.c:1317 [inline]
 __down_write kernel/locking/rwsem.c:1326 [inline]
 down_write+0xab/0xc0 kernel/locking/rwsem.c:1591
 kernfs_remove_by_name_ns+0x5c/0xf0 fs/kernfs/dir.c:1717
 kernfs_remove_by_name include/linux/kernfs.h:633 [inline]
 remove_files fs/sysfs/group.c:28 [inline]
 sysfs_remove_group+0xa5/0x170 fs/sysfs/group.c:328
 sysfs_remove_groups+0x3a/0x80 fs/sysfs/group.c:352
 __kobject_del+0x4b/0x190 lib/kobject.c:595
 kobject_del+0x2e/0x50 lib/kobject.c:627
 ext4_unregister_sysfs+0x75/0x80 fs/ext4/sysfs.c:611
 ext4_put_super+0x4c/0x7d0 fs/ext4/super.c:1292
 generic_shutdown_super+0xe6/0x210 fs/super.c:643
 kill_block_super+0x2a/0x70 fs/super.c:1722
 ext4_kill_sb+0x42/0x80 fs/ext4/super.c:7444
 deactivate_locked_super+0x75/0x1c0 fs/super.c:474
 deactivate_super+0x97/0xa0 fs/super.c:507
 cleanup_mnt+0x2bb/0x330 fs/namespace.c:1318
 __cleanup_mnt+0x19/0x20 fs/namespace.c:1325
 task_work_run+0x130/0x1a0 kernel/task_work.c:233
 resume_user_mode_work include/linux/resume_user_mode.h:50 [inline]
 __exit_to_user_mode_loop kernel/entry/common.c:44 [inline]
 exit_to_user_mode_loop+0x1f7/0x6f0 kernel/entry/common.c:75
 __exit_to_user_mode_prepare include/linux/irq-entry-common.h:226 [inline]
 syscall_exit_to_user_mode_prepare include/linux/irq-entry-common.h:256 [inline]
 syscall_exit_to_user_mode_work include/linux/entry-common.h:159 [inline]
 syscall_exit_to_user_mode include/linux/entry-common.h:194 [inline]
 do_syscall_64+0x1d3/0x2a0 arch/x86/entry/syscall_64.c:100
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

value changed: 0x00 -> 0x01

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 UID: 0 PID: 12788 Comm: syz-executor Tainted: G        W           syzkaller #0 PREEMPT(voluntary) 
Tainted: [W]=WARN
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/25/2025
==================================================================
EXT4-fs (loop5): unmounting filesystem 00000000-0000-0000-0000-000000000000.

Crashes (4):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2026/01/28 02:29 upstream 1f97d9dcf536 3029c699 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in rwsem_down_write_slowpath / rwsem_down_write_slowpath
2026/01/27 11:30 upstream fcb70a56f4d8 9a514c2f .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in rwsem_down_write_slowpath / rwsem_down_write_slowpath
2026/01/27 04:30 upstream fcb70a56f4d8 efb3e894 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in rwsem_down_write_slowpath / rwsem_down_write_slowpath
2026/01/19 04:37 upstream e84d960149e7 20d37d28 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in rwsem_down_write_slowpath / rwsem_down_write_slowpath
* Struck through repros no longer work on HEAD.