Message ID | 20231120-freezer-state-multiple-thaws-v1-1-a4c453f50745@quicinc.com (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
Series | 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);