Re: [PATCH] configfs: lock the group inode in configfs_unregister_group()
From: Breno Leitao
Date: Thu Nov 12 2026 - 06:04:13 EST
On Tue, 10 Nov 2026 05:37:32 -0800, Breno Leitao wrote:
> configfs_unregister_group() detaches a group and marks its directory
> S_DEAD while holding only the parent directory's inode lock. rmdir()
> and configfs_unregister_subsystem() also lock the directory itself,
> and configfs_detach_group() documents that its caller does.
>
> Operations inside the group depend on that lock. symlink(2) holds it
> once the VFS has checked that the directory is not dead, so
> configfs_symlink() expects configfs_get_config_item() to find the item.
> Racing it with configfs_unregister_group() breaks that:
>
> [...]
Applied, thanks!
[1/1] configfs: lock the group inode in configfs_unregister_group()
https://git.kernel.org/pub/scm/linux/kernel/git/leitao/linux.git/commit/?id=2e0fad9d2eae
Best regards,
--
Breno Leitao <leitao@xxxxxxxxxx>