diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2023-12-10 20:09:16 +0100 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2023-12-10 20:09:16 +0100 |
commit | 3a87498869d6d1e7347cd01f337a77984604eb5e (patch) | |
tree | 37b338bbacdf4d26bd5ddc82e0c93e1d1b1e4b85 /kernel | |
parent | Merge tag 'perf_urgent_for_v6.7_rc5' of git://git.kernel.org/pub/scm/linux/ke... (diff) | |
parent | freezer,sched: Do not restore saved_state of a thawed task (diff) | |
download | linux-3a87498869d6d1e7347cd01f337a77984604eb5e.tar.xz linux-3a87498869d6d1e7347cd01f337a77984604eb5e.zip |
Merge tag 'sched_urgent_for_v6.7_rc5' of git://git.kernel.org/pub/scm/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
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/freezer.c | 2 |
1 files changed, 1 insertions, 1 deletions
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); |