Message ID | 20231120-freezer-state-multiple-thaws-v1-1-f2e1dd7ce5a2@quicinc.com |
---|---|
State | Accepted |
Commit | 23ab79e8e469e2605beec2e3ccb40d19c68dd2e0 |
Headers | show |
Series | [1/2] freezer,sched: do not restore saved_state of a thawed task | expand |
diff --git a/kernel/freezer.c b/kernel/freezer.c index c450fa8b8b5e..759006a9a910 100644 --- a/kernel/freezer.c +++ b/kernel/freezer.c @@ -201,7 +201,7 @@ void __thaw_task(struct task_struct *p) if (WARN_ON_ONCE(freezing(p))) goto unlock; - if (task_call_func(p, __restore_freezer_state, NULL)) + if (!frozen(p) || task_call_func(p, __restore_freezer_state, NULL)) goto unlock; wake_up_state(p, TASK_FROZEN);