[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <ZszK1zQJSjuEO4r5@slm.duckdns.org>
Date: Mon, 26 Aug 2024 08:35:03 -1000
From: Tejun Heo <tj@...nel.org>
To: Michal Koutný <mkoutny@...e.com>
Cc: void@...ifault.com, peterz@...radead.org, mingo@...hat.com,
cgroups@...r.kernel.org, lizefan.x@...edance.com,
hannes@...xchg.org, kernel-team@...a.com,
linux-kernel@...r.kernel.org, David Vernet <dvernet@...a.com>,
Josh Don <joshdon@...gle.com>, Hao Luo <haoluo@...gle.com>,
Barret Rhoden <brho@...gle.com>
Subject: Re: [PATCH 1/7] cgroup: Implement cgroup_show_cftypes()
Hello, Michal.
On Tue, Aug 20, 2024 at 04:38:40PM +0200, Michal Koutný wrote:
> On Wed, Aug 07, 2024 at 02:25:23PM GMT, Tejun Heo <tj@...nel.org> wrote:
> > +void cgroup_show_cftype(struct cftype *cft, bool show)
> > +{
> > + struct cgroup_subsys *ss = cft->ss;
> > + struct cgroup *root = ss ? &ss->root->cgrp : &cgrp_dfl_root.cgrp;
>
> Strictly speaking, this (v1) cgroup_root dereference should be guarded
> with cgroup_mutex too (should be the root destroy concurrently).
Ah, right. I think I might just drop this patch. Hiding and showing the
interface files dynamically doesn't seem to work that well in practive (ie.
it causes more production problems than it solves). Something a bit more
boring like triggering a warning when a unimplemented feature is used is
probably better here.
Thanks.
--
tejun
Powered by blists - more mailing lists