From: Tejun Heo <tj@kernel.org>
To: Tim Van Patten <timvp@chromium.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
markhas@google.com, Tim Van Patten <timvp@google.com>,
Johannes Weiner <hannes@cmpxchg.org>,
Zefan Li <lizefan.x@bytedance.com>,
cgroups@vger.kernel.org
Subject: Re: [PATCH] cgroup_freezer: cgroup_freezing: Check if not frozen
Date: Sun, 19 Nov 2023 05:05:31 -1000 [thread overview]
Message-ID: <ZVokO6_4o07FU0xP@slm.duckdns.org> (raw)
In-Reply-To: <20231115162054.2896748-1-timvp@chromium.org>
On Wed, Nov 15, 2023 at 09:20:43AM -0700, Tim Van Patten wrote:
> From: Tim Van Patten <timvp@google.com>
>
> __thaw_task() was recently updated to warn if the task being thawed was
> part of a freezer cgroup that is still currently freezing:
>
> void __thaw_task(struct task_struct *p)
> {
> ...
> if (WARN_ON_ONCE(freezing(p)))
> goto unlock;
>
> This has exposed a bug in cgroup1 freezing where when CGROUP_FROZEN is
> asserted, the CGROUP_FREEZING bits are not also cleared at the same
> time. Meaning, when a cgroup is marked FROZEN it continues to be marked
> FREEZING as well. This causes the WARNING to trigger, because
> cgroup_freezing() thinks the cgroup is still freezing.
>
> There are two ways to fix this:
>
> 1. Whenever FROZEN is set, clear FREEZING for the cgroup and all
> children cgroups.
> 2. Update cgroup_freezing() to also verify that FROZEN is not set.
>
> This patch implements option (2), since it's smaller and more
> straightforward.
>
> Signed-off-by: Tim Van Patten <timvp@google.com>
Applied to cgroup/for-6.7-fixes.
Thanks.
--
tejun
next prev parent reply other threads:[~2023-11-19 15:05 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-15 16:20 Tim Van Patten
2023-11-16 16:29 ` Mark Hasemeyer
2023-11-19 15:05 ` Tejun Heo [this message]
2023-11-27 18:19 ` Mark Hasemeyer
2023-11-28 16:52 ` Tejun Heo
2023-11-28 17:32 ` Mark Hasemeyer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZVokO6_4o07FU0xP@slm.duckdns.org \
--to=tj@kernel.org \
--cc=cgroups@vger.kernel.org \
--cc=hannes@cmpxchg.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lizefan.x@bytedance.com \
--cc=markhas@google.com \
--cc=timvp@chromium.org \
--cc=timvp@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®