Re: [PATCH RFC v3] configfs: don't lock the root inode in configfs_depend_item_unlocked()

From: Lin Tzu Yang

Date: Mon Nov 30 2026 - 04:34:24 EST


On Sun, Nov 29, 2026 at 09:56:21PM +0900, Haruka Amakawa wrote:
> - Not tested: a depend racing with configfs_register_subsystem() or
> configfs_unregister_subsystem() of the target subsystem.

I ran the same tests on arm64 (QEMU/KVM on a Raspberry Pi 5,
PROVE_LOCKING + KASAN, hung task timeout 30s), configfs-next
2e0fad9d2eae with and without this patch.

Without the patch, the tpgt_1 mkdir/rmdir loop against the rename()
loop stops after the first mkdir. lockdep says nothing, and after 30s
the hung task detector reports both tasks, one in
configfs_depend_item_unlocked() and one in lock_two_directories().

With the patch, 60 seconds gives 2468 mkdirs and 4414 rename() calls,
and there are no lockdep, hung task, KASAN or WARNING reports.
rmdir of functions/tcm.usb0 still returns -EBUSY while tpgt_1 exists
and works after it is removed. The configfs selftest passes 25/25,
and the syzbot reproducer for 8c0a48f6c8357c9da819 runs with no
lockdep report.

I did not test the register/unregister race either.

Tested-by: Lin Tzu Yang <rongh7426@xxxxxxxxx>