rtmutex: Avoid deadlock in rt_mutex_start_proxy_lock()

In the event of a lock steal or owner died,
rt_mutex_start_proxy_lock() will give the rt_mutex to the
waiting task, but it fails to release the wait_lock. This leads
to subsequent deadlocks when other tasks try to acquire the
rt_mutex.

I also removed a few extra blank lines that really spaced this
routine out. I must have been high on the \n when I wrote this
originally...

Signed-off-by: Darren Hart <dvhltc@us.ibm.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Dinakar Guniguntala <dino@in.ibm.com>
Cc: John Stultz <johnstul@linux.vnet.ibm.com>
LKML-Reference: <4A79D7F1.4000405@us.ibm.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>

authored by Darren Hart and committed by Ingo Molnar 1bbf2083 90bc1a65

+1 -3
+1 -3
kernel/rtmutex.c
··· 1039 1039 if (!rt_mutex_owner(lock) || try_to_steal_lock(lock, task)) { 1040 1040 /* We got the lock for task. */ 1041 1041 debug_rt_mutex_lock(lock); 1042 - 1043 1042 rt_mutex_set_owner(lock, task, 0); 1044 - 1043 + spin_unlock(&lock->wait_lock); 1045 1044 rt_mutex_deadlock_account_lock(lock, task); 1046 1045 return 1; 1047 1046 } 1048 1047 1049 1048 ret = task_blocks_on_rt_mutex(lock, waiter, task, detect_deadlock); 1050 - 1051 1049 1052 1050 if (ret && !waiter->task) { 1053 1051 /*