Re: [PATCH] cgroup: Fix crash with CLONE_INTO_CGROUP and v1 cgroups
From: Yosry Ahmed
Date: Mon Oct 10 2022 - 16:10:36 EST
On Mon, Oct 10, 2022 at 1:07 PM Tejun Heo <tj@xxxxxxxxxx> wrote:
>
> Hello,
>
> On Mon, Oct 10, 2022 at 12:57:34PM -0700, Yosry Ahmed wrote:
> > Any suggestions for the new names though? Given that the new ones
> > would be the ones that will support both versions, I am not sure how
> > to name them differently in a meaningful way. Maybe something like
> > cgroup_get_all_from_[fd/file]() ?
>
> idk, cgroup12_get_from_[fd/file]()?
>
> > IMO, we can rename the current versions to
> > cgroup_get_dfl_from_[fd/file](), and the new ones (which support both)
> > as cgroup_get_from_fd/file(). In this case it's obvious that one
> > version specifically works on "dfl", aka cgroup2.
>
> It's kinda confusing because we've been assuming that these lookup functions
> are all cgroup2 only.
>
> Thanks.
Got it. Will send a patch shortly. Thanks!
>
> --
> tejun