Re: [PATCH 1/9] sched/core: Drop mutex locks before proxy rescheduling

From: K Prateek Nayak

Date: Mon Jul 06 2026 - 05:16:05 EST


Hello Andrea,

On 7/6/2026 12:20 PM, Andrea Righi wrote:
> find_proxy_task() can call proxy_resched_idle() while holding a mutex
> wait_lock and the blocked task lock. Guard cleanup does not run until
> after the return expression is evaluated.
>
> proxy_resched_idle() invokes scheduling-class callbacks through
> put_prev_set_next_task(). Calling those callbacks with the mutex locks
> held prevents them from safely inspecting the proxy chain, as doing so
> may require acquiring the same locks.
>
> This is a preparatory change to support proxy execution in sched_ext. It
> leaves the guard scope before calling proxy_resched_idle() so sched_ext
> callbacks can safely inspect the proxy chain.
>
> Signed-off-by: Andrea Righi <arighi@xxxxxxxxxx>

I don't see the need to hold anything more than the rq_lock for
proxy_resched_idle(). Feel free to include:

Reviewed-by: K Prateek Nayak <kprateek.nayak@xxxxxxx>

--
Thanks and Regards,
Prateek