Re: [PATCH 2/2] fs/kernfs/dir: obey S_ISGID

From: Greg Kroah-Hartman
Date: Mon Dec 04 2023 - 07:22:22 EST


On Fri, Dec 01, 2023 at 01:56:38PM +0100, Max Kellermann wrote:
> Handling of S_ISGID is usually done by inode_init_owner() in all other
> filesystems, but kernfs doesn't use that function. In kernfs, struct
> kernfs_node is the primary data structure, and struct inode is only
> created from it on demand. Therefore, inode_init_owner() can't be
> used and we need to imitate its behavior.
>
> S_ISGID support is useful for the cgroup filesystem; it allows
> subtrees managed by an unprivileged process to retain a certain owner
> gid, which then enables sharing access to the subtree with another
> unprivileged process.
>
> Signed-off-by: Max Kellermann <max.kellermann@xxxxxxxxx>
> ---
> fs/kernfs/dir.c | 11 +++++++++++
> 1 file changed, 11 insertions(+)

I only see patch 2/2 here, what happened to patch 1/2?

Please send them as a full series, otherwise I don't know what to do
with just this one.

thanks,

greg k-h