diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-08-07 13:15:13 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-08-07 13:15:13 +0000 |
commit | 98f739b627c5daa488e70dae1c8097aa78ca80ae (patch) | |
tree | afd38c73d3b6b7a6567383aeeaee0536dcdcb920 /kernel/sched/deadline.c | |
parent | Adding upstream version 6.9.9. (diff) | |
download | linux-98f739b627c5daa488e70dae1c8097aa78ca80ae.tar.xz linux-98f739b627c5daa488e70dae1c8097aa78ca80ae.zip |
Adding upstream version 6.9.10.upstream/6.9.10
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'kernel/sched/deadline.c')
-rw-r--r-- | kernel/sched/deadline.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/kernel/sched/deadline.c b/kernel/sched/deadline.c index a04a436af8..dce51bf2d3 100644 --- a/kernel/sched/deadline.c +++ b/kernel/sched/deadline.c @@ -1805,8 +1805,13 @@ static void enqueue_task_dl(struct rq *rq, struct task_struct *p, int flags) * The replenish timer needs to be canceled. No * problem if it fires concurrently: boosted threads * are ignored in dl_task_timer(). + * + * If the timer callback was running (hrtimer_try_to_cancel == -1), + * it will eventually call put_task_struct(). */ - hrtimer_try_to_cancel(&p->dl.dl_timer); + if (hrtimer_try_to_cancel(&p->dl.dl_timer) == 1 && + !dl_server(&p->dl)) + put_task_struct(p); p->dl.dl_throttled = 0; } } else if (!dl_prio(p->normal_prio)) { |