Re: [PATCH v3 00/14] Generalized Priority Inheritance via Proxy Execution v3

Peter Zijlstra
2023-04-22T11:55:01Z

Anyway... tglx and bigeasy just pointed me at a problem with
pi_blocked_on vs sched_submit_work(), where if that function were to
block (specifically use rt-mutex), then we get:

__rt_mutex_slowlock()
task_blocks_on_rt_mutex()
current->pi_blocked_on = waiter;
rt_mutex_slowlock_block()
schedule()
sched_submit_work()
...
rt_mutex_lock()
...
current->pi_blocked_on = waiter; // <--- OOPS

And AFAICT we have the exact same problem with the current DEBUG_MUTEXES
->blocked_on state which in this patch-set is generalized and relied
upon more heavily.