Skip to content

Commit 036bdae

Browse files
eberman-quicgregkh
authored andcommitted
freezer,sched: Clean saved_state when restoring it during thaw
commit 418146e upstream. Clean saved_state after using it during thaw. Cleaning the saved_state allows us to avoid some unnecessary branches in ttwu_state_match. Signed-off-by: Elliot Berman <quic_eberman@quicinc.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Link: https://lore.kernel.org/r/20231120-freezer-state-multiple-thaws-v1-2-f2e1dd7ce5a2@quicinc.com Signed-off-by: Chen Ridong <chenridong@huawei.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 2e62985 commit 036bdae

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

kernel/freezer.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,7 @@ static int __restore_freezer_state(struct task_struct *p, void *arg)
187187

188188
if (state != TASK_RUNNING) {
189189
WRITE_ONCE(p->__state, state);
190+
p->saved_state = TASK_RUNNING;
190191
return 1;
191192
}
192193

0 commit comments

Comments
 (0)