Re: [PATCH] sched/deadline: Fix imbalanced task reference
From: Juri Lelli
Date: Wed Aug 07 2024 - 05:46:29 EST
On 07/08/24 17:39, Zhang Qiao wrote:
>
>
> Hi,
> 在 2024/8/7 17:00, Juri Lelli 写道:
> > Hi,
> >
> > On 07/08/24 16:30, Zhang Qiao wrote:
> >> When starting a deadline inactive_timer, the task_struct refs will
> >> be incremented only if dl_server is not set. But when canceling the
> >> inactive_timer, the task refs will be decremented whether dl_server is
> >> set or not, leading to a task reference imbalance issue.
> >>
> >> This patch fixes the imbalanced reference by adding a '!dl_server()'
> >> checker before calling put_task_struct().
> >>
> >> Fixes: 63ba8422f876 ("sched/deadline: Introduce deadline servers")
> >> Signed-off-by: Zhang Qiao <zhangqiao22@xxxxxxxxxx>
> >
> > Isn't this equivalent to Wander's patch below?
> >
>
> Yeah, i didn't notice it.
Thanks for confirming!