[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20230326213900.GJ363182@maniforge>
Date: Sun, 26 Mar 2023 16:39:00 -0500
From: David Vernet <void@...ifault.com>
To: Markus Elfring <Markus.Elfring@....de>
Cc: Lorenzo Stoakes <lstoakes@...il.com>,
kernel-janitors@...r.kernel.org, linux-kselftest@...r.kernel.org,
cgroups@...r.kernel.org, linux-mm@...ck.org,
Jay Kamat <jgkamat@...com>,
Johannes Weiner <hannes@...xchg.org>,
Michal Hocko <mhocko@...nel.org>,
Muchun Song <muchun.song@...ux.dev>,
Roman Gushchin <roman.gushchin@...ux.dev>,
Shakeel Butt <shakeelb@...gle.com>,
Shuah Khan <shuah@...nel.org>, Tejun Heo <tj@...nel.org>,
Zefan Li <lizefan.x@...edance.com>, cocci@...ia.fr,
LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] selftests: cgroup: Fix exception handling in
test_memcg_oom_group_score_events()
On Sun, Mar 26, 2023 at 10:15:31AM +0200, Markus Elfring wrote:
[...]
> >>
> >> Fixes: a987785dcd6c8ae2915460582aebd6481c81eb67 ("Add tests for memory.oom.group")
> >
> > Fixes what in the what now?
>
> 1. Check repetition (which can be undesirable)
>
> 2. Can a cg_destroy() call ever work as expected if a cg_create() call failed?
Perhaps next time you can answer your own question by spending 30
seconds actually reading the code you're "fixing":
int cg_destroy(const char *cgroup)
{
int ret;
retry:
ret = rmdir(cgroup);
if (ret && errno == EBUSY) {
cg_killall(cgroup);
usleep(100);
goto retry;
}
if (ret && errno == ENOENT) <<< that case is explicitly handled here
ret = 0;
return ret;
}
Powered by blists - more mailing lists