* [PATCH cgroup] https://github.com/raspberrypi/linux/issues/6631
@ 2025-02-01 9:51 Umar Pathan
2025-02-01 14:08 ` David Reaver
0 siblings, 1 reply; 3+ messages in thread
From: Umar Pathan @ 2025-02-01 9:51 UTC (permalink / raw)
To: tj; +Cc: lizefan.x, hannes, cgroups, linux-kernel, Umar Pathan
The existing freezer propagation logic improperly reduces
nr_frozen_descendants by an increasing 'desc' counter during unfreeze,
leading to:
- Premature parent cgroup unfreezing
- Negative descendant counts
- Broken hierarchy state consistency
Scenario demonstrating the bug:
1. Create hierarchy A->B->C
2. Freeze C (A/B freeze via propagation)
3. Freeze A->D (separate branch)
4. Unfreeze C -> A incorrectly unfreezes despite frozen D
Fixes: 711f763 ("freezer,cgroup: add freezer.stats subsystem")
Signed-off-by: Umar cynexium@gmail.com
---
kernel/cgroup/freezer.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/kernel/cgroup/freezer.c b/kernel/cgroup/freezer.c
index e9c15fbe5d9b..d384df2f53c2 100644
--- a/kernel/cgroup/freezer.c
+++ b/kernel/cgroup/freezer.c
@@ -304,6 +304,7 @@ void cgroup_freeze(struct cgroup *cgrp, bool freeze)
*/
if (dsct->freezer.e_freeze > 0)
continue;
+
WARN_ON_ONCE(dsct->freezer.e_freeze < 0);
}
--
2.47.1
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH cgroup] https://github.com/raspberrypi/linux/issues/6631
2025-02-01 9:51 [PATCH cgroup] https://github.com/raspberrypi/linux/issues/6631 Umar Pathan
@ 2025-02-01 14:08 ` David Reaver
2025-02-11 14:09 ` Michal Koutný
0 siblings, 1 reply; 3+ messages in thread
From: David Reaver @ 2025-02-01 14:08 UTC (permalink / raw)
To: Umar Pathan; +Cc: tj, lizefan.x, hannes, cgroups, linux-kernel, Umar Pathan
Umar Pathan <cynexium@gmail.com> writes:
> The existing freezer propagation logic improperly reduces
> nr_frozen_descendants by an increasing 'desc' counter during unfreeze,
> leading to:
> - Premature parent cgroup unfreezing
> - Negative descendant counts
> - Broken hierarchy state consistency
>
> Scenario demonstrating the bug:
> 1. Create hierarchy A->B->C
> 2. Freeze C (A/B freeze via propagation)
> 3. Freeze A->D (separate branch)
> 4. Unfreeze C -> A incorrectly unfreezes despite frozen D
>
> Fixes: 711f763 ("freezer,cgroup: add freezer.stats subsystem")
> Signed-off-by: Umar cynexium@gmail.com
> ---
> kernel/cgroup/freezer.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/kernel/cgroup/freezer.c b/kernel/cgroup/freezer.c
> index e9c15fbe5d9b..d384df2f53c2 100644
> --- a/kernel/cgroup/freezer.c
> +++ b/kernel/cgroup/freezer.c
> @@ -304,6 +304,7 @@ void cgroup_freeze(struct cgroup *cgrp, bool freeze)
> */
> if (dsct->freezer.e_freeze > 0)
> continue;
> +
> WARN_ON_ONCE(dsct->freezer.e_freeze < 0);
> }
Hey Umar,
I dug around Github and I think I found the patch you intended to submit
https://github.com/raspberrypi/linux/pull/6632/commits/711f76376ae7e11f48a1c22a4a04828a24d6a87a
Unfortunately, your email only contains the inverse of your PR's
whitespace change removing a line in freezer.c, not the rest of the
patch. Did you perhaps revert that whitespace change in a new commit and
accidentally only submit that commit instead of the whole change?
Thanks,
David Reaver
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH cgroup] https://github.com/raspberrypi/linux/issues/6631
2025-02-01 14:08 ` David Reaver
@ 2025-02-11 14:09 ` Michal Koutný
0 siblings, 0 replies; 3+ messages in thread
From: Michal Koutný @ 2025-02-11 14:09 UTC (permalink / raw)
To: David Reaver
Cc: Umar Pathan, tj, lizefan.x, hannes, cgroups, linux-kernel,
Umar Pathan
[-- Attachment #1: Type: text/plain, Size: 844 bytes --]
Hello both.
On Sat, Feb 01, 2025 at 06:08:55AM -0800, David Reaver <me@davidreaver.com> wrote:
> I dug around Github and I think I found the patch you intended to submit
> https://github.com/raspberrypi/linux/pull/6632/commits/711f76376ae7e11f48a1c22a4a04828a24d6a87a
Heh, thanks.
> Unfortunately, your email only contains the inverse of your PR's
> whitespace change removing a line in freezer.c, not the rest of the
> patch. Did you perhaps revert that whitespace change in a new commit and
> accidentally only submit that commit instead of the whole change?
There was little freezing counting rework in v6.13. If you can still
reproduce the issue, it'd be something to look into. (I'm not sure about
interpretation of the direct/propagate freezing in the reproduction
steps, if there were sample commands, it'd be nice.)
Thanks,
Michal
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-02-11 14:09 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-01 9:51 [PATCH cgroup] https://github.com/raspberrypi/linux/issues/6631 Umar Pathan
2025-02-01 14:08 ` David Reaver
2025-02-11 14:09 ` Michal Koutný
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox