On Tue, Jul 29, 2025 at 09:22:10PM +0800, Chen Ridong wrote:
On 2025/7/24 17:43, Greg KH wrote:
On Thu, Jul 24, 2025 at 05:38:52PM +0800, Chen Ridong wrote:
On 2025/7/23 13:06, Greg KH wrote:
On Wed, Jul 23, 2025 at 09:01:43AM +0800, Chen Ridong wrote:
On 2025/7/22 20:38, Greg KH wrote:
On Tue, Jul 22, 2025 at 08:25:49PM +0800, Chen Ridong wrote: > > > On 2025/7/22 20:18, Greg KH wrote: >> On Tue, Jul 22, 2025 at 09:29:13AM +0800, Chen Ridong wrote: >>> >>>> This is a note to let you know that I've just added the patch titled >>>> >>>> Revert "cgroup_freezer: cgroup_freezing: Check if not frozen" >>>> >>>> to the 6.15-stable tree which can be found at: >>>> http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git%3Ba=su... >>>> >>>> The filename of the patch is: >>>> revert-cgroup_freezer-cgroup_freezing-check-if-not-f.patch >>>> and it can be found in the queue-6.15 subdirectory. >>>> >>>> If you, or anyone else, feels it should not be added to the stable tree, please let stable@vger.kernel.org know about it. >>>> >>> >>> The patch ("sched,freezer: Remove unnecessary warning in __thaw_task") should also be merged to >>> prevent triggering another warning in __thaw_task(). >> >> What is the git commit id of that change in Linus's tree? >> >> thanks, >> >> greg k-h > > 9beb8c5e77dc10e3889ff5f967eeffba78617a88 ("sched,freezer: Remove unnecessary warning in __thaw_task")
Thanks, but that didn't apply to 6.1.y or 6.6.y. Shouldn't it also go there as that's what this revert was applied back to.
greg k-h
Hi Greg,
The commit 9beb8c5e77dc ("sched,freezer: Remove unnecessary warning...") should be merged together with 14a67b42cb6f ("Revert "cgroup_freezer: cgroup_freezing: Check if not frozen"") to avoid the warning for 6.1.y or 6.6.y.
Ok, but 9beb8c5e77dc does not apply properly there. Can you please provide a working backport?
thanks,
greg k-h
IIUC, we need to backport these two commits together: 1.commit 23ab79e8e469 ("freezer,sched: Do not restore saved_state of a thawed task") 2.commit 9beb8c5e77dc ("sched,freezer: Remove unnecessary warning...").
After applying these prerequisites, the required change becomes minimal:
diff --git a/kernel/freezer.c b/kernel/freezer.c index 4fad0e6fca64..288d1cce1fc4 100644 --- a/kernel/freezer.c +++ b/kernel/freezer.c @@ -196,7 +196,7 @@ void __thaw_task(struct task_struct *p) unsigned long flags, flags2;
spin_lock_irqsave(&freezer_lock, flags);
if (WARN_ON_ONCE(freezing(p)))
if (!frozen(p)) goto unlock; if (lock_task_sighand(p, &flags2)) {
Would you like me to prepare and submit this patch for the stable branches (6.6.y and 6.1.y)?
Yes, please send me the missing patches as a series for each branch that needs them.
thanks,
greg k-h
Hi Greg and maintainers,
I've sent the patch series for 6.6.y. Backporting commit 9beb8c5e77dc ("sched,freezer: Remove unnecessary warning...") requires 4 patches for 6.6.y, and the backport to 6.1.y would be even more complex.
As an alternative, I'm considering addressing the warning directly with the patch I mentioned previously. What are your thoughts on this approach?
The new patch:
diff --git a/kernel/freezer.c b/kernel/freezer.c index 4fad0e6fca64..288d1cce1fc4 100644 --- a/kernel/freezer.c +++ b/kernel/freezer.c @@ -196,7 +196,7 @@ void __thaw_task(struct task_struct *p) unsigned long flags, flags2;
spin_lock_irqsave(&freezer_lock, flags);
if (WARN_ON_ONCE(freezing(p)))
if (!frozen(p)) goto unlock; if (lock_task_sighand(p, &flags2)) {
I have no idea, sorry, please work with the developers/maintainers of the original change and get their approval. But normally, we do NOT want one-off changes being made to older kernel trees unless it has to be done, as that makes maintaining them much much much harder over time.
thanks,
greg k-h