================================================================== BUG: KCSAN: data-race in __kernfs_remove / kernfs_iop_permission read-write to 0xffff8881022e8c40 of 8 bytes by task 24949 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+0xa7/0xc0 block/partitions/core.c:285 bdev_disk_changed+0x156/0xbd0 block/partitions/core.c:667 __loop_clr_fd+0x290/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/0x5f0 fs/file_table.c:384 __fput_sync+0x44/0x50 fs/file_table.c:465 __do_sys_close fs/open.c:1572 [inline] __se_sys_close+0xfa/0x1a0 fs/open.c:1557 __x64_sys_close+0x1f/0x30 fs/open.c:1557 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 0xffff8881022e8c40 of 8 bytes by task 2772 on cpu 1: kernfs_refresh_inode fs/kernfs/inode.c:180 [inline] kernfs_iop_permission+0x18a/0x1e0 fs/kernfs/inode.c:288 do_inode_permission fs/namei.c:461 [inline] inode_permission+0x184/0x300 fs/namei.c:528 may_lookup fs/namei.c:1723 [inline] link_path_walk+0x19e/0x7e0 fs/namei.c:2270 path_lookupat+0x72/0x2a0 fs/namei.c:2481 filename_lookup+0x126/0x300 fs/namei.c:2511 user_path_at_empty+0x42/0x110 fs/namei.c:2910 do_readlinkat+0x92/0x210 fs/stat.c:516 __do_sys_readlink fs/stat.c:549 [inline] __se_sys_readlink fs/stat.c:546 [inline] __x64_sys_readlink+0x47/0x50 fs/stat.c:546 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: 0x0000000000000066 -> 0x0000000000000065 Reported by Kernel Concurrency Sanitizer on: CPU: 1 PID: 2772 Comm: udevd Not tainted 6.5.0-syzkaller-01207-g1c59d383390f #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/26/2023 ================================================================== loop3: p1 p2 p3 < > I/O error, dev loop3, sector 0 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 2 buffer_io_error: 6 callbacks suppressed Buffer I/O error on dev loop3, logical block 0, async page read loop3: unable to read partition table loop3: partition table beyond EOD, truncated loop3: p1 p2 p3 < > I/O error, dev loop1, sector 0 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 2