syzbot


KCSAN: data-race in __radix_tree_delete / __radix_tree_replace

Status: auto-obsoleted due to no activity on 2023/04/11 11:51
Subsystems: kernfs
[Documentation on labels]
First crash: 950d, last: 950d

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

read-write to 0xffff888144c1d002 of 1 bytes by task 23844 on cpu 0:
 replace_slot lib/radix-tree.c:825 [inline]
 __radix_tree_delete+0x4e8/0x540 lib/radix-tree.c:1377
 radix_tree_delete_item+0x1a7/0x260 lib/radix-tree.c:1429
 idr_remove+0x2a/0x30 lib/idr.c:154
 __kernfs_new_node+0x2cc/0x330 fs/kernfs/dir.c:661
 kernfs_new_node fs/kernfs/dir.c:676 [inline]
 kernfs_create_dir_ns+0x5e/0x140 fs/kernfs/dir.c:1032
 internal_create_group+0x14c/0x830 fs/sysfs/group.c:136
 sysfs_create_group+0x1b/0x20 fs/sysfs/group.c:174
 loop_sysfs_init drivers/block/loop.c:746 [inline]
 loop_configure+0xa40/0xc30 drivers/block/loop.c:1097
 lo_ioctl+0x641/0x1290
 blkdev_ioctl+0x215/0x440 block/ioctl.c:616
 vfs_ioctl fs/ioctl.c:51 [inline]
 __do_sys_ioctl fs/ioctl.c:870 [inline]
 __se_sys_ioctl+0xcb/0x140 fs/ioctl.c:856
 __x64_sys_ioctl+0x3f/0x50 fs/ioctl.c:856
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x2b/0x70 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x63/0xcd

read-write to 0xffff888144c1d002 of 1 bytes by task 23845 on cpu 1:
 replace_slot lib/radix-tree.c:825 [inline]
 __radix_tree_replace+0x161/0x1c0 lib/radix-tree.c:888
 radix_tree_iter_replace+0x33/0x40 lib/radix-tree.c:933
 idr_alloc_u32 lib/idr.c:52 [inline]
 idr_alloc_cyclic+0x1e4/0x2e0 lib/idr.c:125
 __kernfs_new_node+0xb3/0x330 fs/kernfs/dir.c:620
 kernfs_new_node fs/kernfs/dir.c:676 [inline]
 kernfs_create_dir_ns+0x5e/0x140 fs/kernfs/dir.c:1032
 internal_create_group+0x14c/0x830 fs/sysfs/group.c:136
 sysfs_create_group+0x1b/0x20 fs/sysfs/group.c:174
 loop_sysfs_init drivers/block/loop.c:746 [inline]
 loop_configure+0xa40/0xc30 drivers/block/loop.c:1097
 lo_ioctl+0x641/0x1290
 blkdev_ioctl+0x215/0x440 block/ioctl.c:616
 vfs_ioctl fs/ioctl.c:51 [inline]
 __do_sys_ioctl fs/ioctl.c:870 [inline]
 __se_sys_ioctl+0xcb/0x140 fs/ioctl.c:856
 __x64_sys_ioctl+0x3f/0x50 fs/ioctl.c:856
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x2b/0x70 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x63/0xcd

value changed: 0x0a -> 0x09

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 23845 Comm: syz-executor.4 Not tainted 6.2.0-rc4-syzkaller-00009-gd532dd102151-dirty #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022
==================================================================
loop4: detected capacity change from 0 to 128

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/01/17 11:30 upstream d532dd102151 a63719e7 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in __radix_tree_delete / __radix_tree_replace
* Struck through repros no longer work on HEAD.