aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--kernel/locking/rtmutex.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/kernel/locking/rtmutex.c b/kernel/locking/rtmutex.c
index 39c9f8075e14..cd517091fb21 100644
--- a/kernel/locking/rtmutex.c
+++ b/kernel/locking/rtmutex.c
@@ -463,6 +463,8 @@ static int rt_mutex_adjust_prio_chain(struct task_struct *task,
463 463
464 /* Release the task */ 464 /* Release the task */
465 raw_spin_unlock_irqrestore(&task->pi_lock, flags); 465 raw_spin_unlock_irqrestore(&task->pi_lock, flags);
466 put_task_struct(task);
467
466 if (!rt_mutex_owner(lock)) { 468 if (!rt_mutex_owner(lock)) {
467 /* 469 /*
468 * If the requeue above changed the top waiter, then we need 470 * If the requeue above changed the top waiter, then we need
@@ -472,9 +474,8 @@ static int rt_mutex_adjust_prio_chain(struct task_struct *task,
472 if (top_waiter != rt_mutex_top_waiter(lock)) 474 if (top_waiter != rt_mutex_top_waiter(lock))
473 wake_up_process(rt_mutex_top_waiter(lock)->task); 475 wake_up_process(rt_mutex_top_waiter(lock)->task);
474 raw_spin_unlock(&lock->wait_lock); 476 raw_spin_unlock(&lock->wait_lock);
475 goto out_put_task; 477 return 0;
476 } 478 }
477 put_task_struct(task);
478 479
479 /* Grab the next task */ 480 /* Grab the next task */
480 task = rt_mutex_owner(lock); 481 task = rt_mutex_owner(lock);