Re: [PATCH v27 02/10] sched: Avoid donor->sched_class->yield_task() null traversal
From: K Prateek Nayak
Date: Sat Apr 04 2026 - 01:58:22 EST
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.
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?
--
Thanks and Regards,
Prateek