Re: [PATCH v27 02/10] sched: Avoid donor->sched_class->yield_task() null traversal
From: John Stultz
Date: Sat Apr 04 2026 - 02:10:23 EST
On Fri, Apr 3, 2026 at 10:58 PM K Prateek Nayak <kprateek.nayak@xxxxxxx> wrote:
>
> Hello John,
>
> On 4/4/2026 11:06 AM, John Stultz wrote:
> > With proxy-exec once we do return migration from ttwu(), if a
> > task is proxying for a waiting donor, and the donor is woken up,
> > we switch the rq->donor to point to idle briefly until we can
> > re-enter __schedule().
> >
> > However, if a task that was acting as a proxy calls into
> > yield() right after the donor is switched to idle, it may
> > trip a null pointer traversal, because the idle task doesn't
> > have a yield_task() pointer.
>
> After introduction of proxy_resched_idle(), we shouldn't
> have any case of running with rq->idle as donor with a
> different rq->curr.
Oh good point.
> I think we can drop this fix now and squash the changes from
> Patch 7 into Patch 6 to even avoid any transient cases during
> bisection where this might be possible
>
> Thoughts?
That sounds fine by me. Next week.
thanks
-john