================================================================== BUG: KCSAN: data-race in __kernfs_remove / kernfs_iop_permission read-write to 0xffff8881023d58c0 of 8 bytes by task 3083 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+0x2c1/0x3b0 drivers/block/loop.c:1189 loop_clr_fd drivers/block/loop.c:1257 [inline] lo_ioctl+0xe93/0x12e0 drivers/block/loop.c:1563 blkdev_ioctl+0x375/0x460 block/ioctl.c:621 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:870 [inline] __se_sys_ioctl+0xcf/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 0xffff8881023d58c0 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_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: 0x0000000000000030 -> 0x000000000000002f Reported by Kernel Concurrency Sanitizer on: CPU: 1 PID: 2768 Comm: udevd Not tainted 6.5.0-rc7-syzkaller-00004-gf7757129e3de #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/26/2023 ==================================================================