================================================================== BUG: KCSAN: data-race in kernfs_iop_permission / kernfs_link_sibling read-write to 0xffff888101ad4040 of 8 bytes by task 12306 on cpu 0: kernfs_link_sibling+0x1e7/0x230 fs/kernfs/dir.c:387 kernfs_add_one+0x260/0x390 fs/kernfs/dir.c:768 kernfs_create_dir_ns+0x100/0x150 fs/kernfs/dir.c:1044 sysfs_create_dir_ns+0xd7/0x1d0 fs/sysfs/dir.c:59 create_dir lib/kobject.c:65 [inline] kobject_add_internal+0x47b/0x780 lib/kobject.c:233 kobject_add_varg lib/kobject.c:368 [inline] kobject_add+0xdc/0x150 lib/kobject.c:420 device_add+0x2ff/0xab0 drivers/base/core.c:3563 device_add_disk+0x2b7/0x880 block/genhd.c:465 add_disk include/linux/blkdev.h:741 [inline] loop_add+0x4b8/0x560 drivers/block/loop.c:2060 loop_control_ioctl+0xc8/0x440 drivers/block/loop.c:2179 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:870 [inline] __se_sys_ioctl+0xc9/0x140 fs/ioctl.c:856 __x64_sys_ioctl+0x43/0x50 fs/ioctl.c:856 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x41/0xc0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd read to 0xffff888101ad4040 of 8 bytes by task 11918 on cpu 1: kernfs_refresh_inode fs/kernfs/inode.c:181 [inline] kernfs_iop_permission+0x165/0x1b0 fs/kernfs/inode.c:289 do_inode_permission fs/namei.c:461 [inline] inode_permission+0x184/0x300 fs/namei.c:528 may_lookup fs/namei.c:1720 [inline] link_path_walk+0x19e/0x7e0 fs/namei.c:2267 path_lookupat+0x72/0x2a0 fs/namei.c:2478 filename_lookup+0x126/0x300 fs/namei.c:2508 vfs_statx+0xa9/0x300 fs/stat.c:238 vfs_fstatat fs/stat.c:276 [inline] __do_sys_newfstatat fs/stat.c:446 [inline] __se_sys_newfstatat+0x8a/0x2a0 fs/stat.c:440 __x64_sys_newfstatat+0x55/0x60 fs/stat.c:440 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x41/0xc0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd value changed: 0x0000000000000009 -> 0x000000000000000a Reported by Kernel Concurrency Sanitizer on: CPU: 1 PID: 11918 Comm: udevd Not tainted 6.4.0-rc6-syzkaller-00269-g1b29d271614a #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/27/2023 ==================================================================