diff options
| author | Dave Airlie <airlied@redhat.com> | 2024-11-04 14:25:33 +1000 |
|---|---|---|
| committer | Dave Airlie <airlied@redhat.com> | 2024-11-04 14:25:33 +1000 |
| commit | 30169bb64580bd7bce9290c1952bf0aa6cc37fe5 (patch) | |
| tree | 94c6ab9dec68f5648a055752aad32d816bd27e11 /kernel/freezer.c | |
| parent | bcfe43f0ea77c42c2154fb79b99b7d1d82ac3231 (diff) | |
| parent | 59b723cd2adbac2a34fc8e12c74ae26ae45bf230 (diff) | |
Backmerge v6.12-rc6 of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux into drm-next
Backmerge Linus tree for some drm-fixes needed for msm and xe merges.
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'kernel/freezer.c')
| -rw-r--r-- | kernel/freezer.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/kernel/freezer.c b/kernel/freezer.c index 44bbd7dbd2c8..8d530d0949ff 100644 --- a/kernel/freezer.c +++ b/kernel/freezer.c @@ -109,7 +109,12 @@ static int __set_task_frozen(struct task_struct *p, void *arg) { unsigned int state = READ_ONCE(p->__state); - if (p->on_rq) + /* + * Allow freezing the sched_delayed tasks; they will not execute until + * ttwu() fixes them up, so it is safe to swap their state now, instead + * of waiting for them to get fully dequeued. + */ + if (task_is_runnable(p)) return 0; if (p != current && task_curr(p)) |
