================================================================== BUG: KCSAN: data-race in __kernfs_remove / kernfs_iop_permission read-write to 0xffff88813f72bd40 of 8 bytes by task 22039 on cpu 0: kernfs_unlink_sibling fs/kernfs/dir.c:412 [inline] __kernfs_remove+0x2ee/0x440 fs/kernfs/dir.c:1467 kernfs_remove+0x4e/0x70 fs/kernfs/dir.c:1503 sysfs_remove_dir+0x7e/0xa0 fs/sysfs/dir.c:101 __kobject_del+0x9d/0x1a0 lib/kobject.c:597 kobject_del+0x2e/0x50 lib/kobject.c:620 device_del+0x724/0x790 drivers/base/core.c:3823 rfkill_unregister+0x80/0x170 net/rfkill/core.c:1128 nfc_unregister_device+0x52/0x130 net/nfc/core.c:1167 nci_unregister_device+0x14c/0x160 net/nfc/nci/core.c:1303 virtual_ncidev_close+0x30/0x50 drivers/nfc/virtual_ncidev.c:163 __fput+0x2fd/0x600 fs/file_table.c:384 ____fput+0x15/0x20 fs/file_table.c:412 task_work_run+0x135/0x1a0 kernel/task_work.c:179 exit_task_work include/linux/task_work.h:38 [inline] do_exit+0x5ff/0x1670 kernel/exit.c:874 do_group_exit+0x101/0x150 kernel/exit.c:1024 get_signal+0xeb7/0xff0 kernel/signal.c:2881 arch_do_signal_or_restart+0x89/0x2a0 arch/x86/kernel/signal.c:308 exit_to_user_mode_loop+0x6f/0xe0 kernel/entry/common.c:168 exit_to_user_mode_prepare+0x6c/0xb0 kernel/entry/common.c:204 __syscall_exit_to_user_mode_work kernel/entry/common.c:286 [inline] syscall_exit_to_user_mode+0x26/0x140 kernel/entry/common.c:297 do_syscall_64+0x4d/0xc0 arch/x86/entry/common.c:86 entry_SYSCALL_64_after_hwframe+0x63/0xcd read to 0xffff88813f72bd40 of 8 bytes by task 2767 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_openat+0x1a1/0x1d10 fs/namei.c:3789 do_filp_open+0xf6/0x200 fs/namei.c:3820 do_sys_openat2+0xab/0x110 fs/open.c:1407 do_sys_open fs/open.c:1422 [inline] __do_sys_openat fs/open.c:1438 [inline] __se_sys_openat fs/open.c:1433 [inline] __x64_sys_openat+0xf3/0x120 fs/open.c:1433 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: 0x0000000000000002 -> 0x0000000000000001 Reported by Kernel Concurrency Sanitizer on: CPU: 1 PID: 2767 Comm: udevd Not tainted 6.5.0-rc5-syzkaller-00029-g14f9643dc90a #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/26/2023 ==================================================================