================================================================== BUG: KCSAN: data-race in __kernfs_remove / kernfs_iop_permission read-write to 0xffff888141be35c0 of 8 bytes by task 3183 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 drop_partition block/partitions/core.c:273 [inline] delete_partition+0xb2/0xc0 block/partitions/core.c:288 bdev_disk_changed+0x156/0xbd0 block/partitions/core.c:670 __loop_clr_fd+0x295/0x3b0 drivers/block/loop.c:1189 lo_release+0xe4/0xf0 drivers/block/loop.c:1743 blkdev_put+0x3f2/0x470 blkdev_release+0x50/0x60 block/fops.c:533 __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 resume_user_mode_work include/linux/resume_user_mode.h:49 [inline] exit_to_user_mode_loop+0xd1/0xe0 kernel/entry/common.c:171 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 0xffff888141be35c0 of 8 bytes by task 2768 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 user_path_at_empty+0x42/0x110 fs/namei.c:2907 do_readlinkat+0x92/0x210 fs/stat.c:477 __do_sys_readlink fs/stat.c:510 [inline] __se_sys_readlink fs/stat.c:507 [inline] __x64_sys_readlink+0x47/0x50 fs/stat.c:507 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: 0x000000000000003a -> 0x0000000000000039 Reported by Kernel Concurrency Sanitizer on: CPU: 1 PID: 2768 Comm: udevd Not tainted 6.5.0-rc7-syzkaller-00182-g3b35375f19fe #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/26/2023 ==================================================================