On Mon, 26 Sep 2016, Peter Zijlstra wrote: > This is because rt_mutex_enqueue_pi() and rt_mutex_dequeue_pi() > are only protected by pi_lock when operating pi waiters, while > rt_mutex_get_top_task(), will access them with rq lock held but > not holding pi_lock. > > In order to tackle it, we introduce new "pi_top_task" pointer > cached in task_struct, and add new rt_mutex_update_top_task() > to update its value, it can be called by rt_mutex_setprio() > which held both owner's pi_lock and rq lock. Thus "pi_top_task" > can be safely accessed by enqueue_task_dl() under rq lock.
Reviewed-by: Thomas Gleixner <[email protected]>

