提交 def34eaa 编写于 作者: M Mike Galbraith 提交者: Thomas Gleixner

rtmutex: Plug preempt count leak in rt_mutex_futex_unlock()

mark_wakeup_next_waiter() already disables preemption, doing so again
leaves us with an unpaired preempt_disable().

Fixes: 2a1c6029 ("rtmutex: Deboost before waking up the top waiter")
Signed-off-by: NMike Galbraith <efault@gmx.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: xlpang@redhat.com
Cc: rostedt@goodmis.org
Link: http://lkml.kernel.org/r/1491379707.6538.2.camel@gmx.deSigned-off-by: NThomas Gleixner <tglx@linutronix.de>
上级 19830e55
......@@ -1581,13 +1581,13 @@ bool __sched __rt_mutex_futex_unlock(struct rt_mutex *lock,
return false; /* done */
}
mark_wakeup_next_waiter(wake_q, lock);
/*
* We've already deboosted, retain preempt_disabled when dropping
* the wait_lock to avoid inversion until the wakeup. Matched
* by rt_mutex_postunlock();
* We've already deboosted, mark_wakeup_next_waiter() will
* retain preempt_disabled when we drop the wait_lock, to
* avoid inversion prior to the wakeup. preempt_disable()
* therein pairs with rt_mutex_postunlock().
*/
preempt_disable();
mark_wakeup_next_waiter(wake_q, lock);
return true; /* call postunlock() */
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册