Unverified Commit e6ee6d51 authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files

!10630 sched/deadline: Fix task_struct reference leak

parents e6bd197e 836f84e5
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -1528,8 +1528,12 @@ 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)
				put_task_struct(p);
			p->dl.dl_throttled = 0;
		}
	} else if (!dl_prio(p->normal_prio)) {