Skip to content

Commit

Permalink
Merge tag 'sched_urgent_for_v6.7_rc5' of git://git.kernel.org/pub/scm…
Browse files Browse the repository at this point in the history
…/linux/kernel/git/tip/tip

Pull scheduler fix from Borislav Petkov:

 - Make sure tasks are thawed exactly and only once to avoid their state
   getting corrupted

* tag 'sched_urgent_for_v6.7_rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  freezer,sched: Do not restore saved_state of a thawed task
  • Loading branch information
torvalds committed Dec 10, 2023
2 parents 537ccb5 + 23ab79e commit 3a87498
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kernel/freezer.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 3a87498

Please sign in to comment.