rtmutex: Fix more prio comparisons
authorPeter Zijlstra <peterz@infradead.org>
Thu, 23 Mar 2017 14:56:14 +0000 (15:56 +0100)
committerThomas Gleixner <tglx@linutronix.de>
Tue, 4 Apr 2017 09:44:07 +0000 (11:44 +0200)
commit19830e55247cddb3f46f1bf60b8e245593491bea
treecd0995361901d81ef37e13f24d894a990f5f471b
parente0aad5b44ff5d28ac1d6ae70cdf84ca228e889dc
rtmutex: Fix more prio comparisons

There was a pure ->prio comparison left in try_to_wake_rt_mutex(),
convert it to use rt_mutex_waiter_less(), noting that greater-or-equal
is not-less (both in kernel priority view).

This necessitated the introduction of cmp_task() which creates a
pointer to an unnamed stack variable of struct rt_mutex_waiter type to
compare against tasks.

With this, we can now also create and employ rt_mutex_waiter_equal().

Reviewed-and-tested-by: Juri Lelli <juri.lelli@arm.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Cc: juri.lelli@arm.com
Cc: bigeasy@linutronix.de
Cc: xlpang@redhat.com
Cc: rostedt@goodmis.org
Cc: mathieu.desnoyers@efficios.com
Cc: jdesfossez@efficios.com
Cc: bristot@redhat.com
Link: http://lkml.kernel.org/r/20170323150216.455584638@infradead.org
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
kernel/locking/rtmutex.c