Hi Harshit,
This is a backport of upstream commit 690e47d1403e90b7f2366f03b52ed3304194c793 ("sched/rt: Fix race in push_rt_task") for the 6.12 stable series (and potentially 6.6 if applicable).
From code analysis, the same underlying race issue should exist in the 6.12 and 6.6 kernels.
Since 6.12 or older kernel doesn't have commit:af0c8b2bf67b("sched: Split scheduler and execution contexts"), so the backport patch removed BUG_ON(task_current_donor(rq, p)) in pick_netxt_pushable_task().
Please help to review if we can safty backport this fix to an older kernel, thanks.
Regards, Raj.
Harshit Agarwal (1): sched/rt: Fix race in push_rt_task
kernel/sched/rt.c | 52 +++++++++++++++++++++++------------------------ 1 file changed, 25 insertions(+), 27 deletions(-)