[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1441188096-23021-4-git-send-email-juri.lelli@arm.com>
Date: Wed, 2 Sep 2015 11:01:35 +0100
From: Juri Lelli <juri.lelli@....com>
To: peterz@...radead.org, mingo@...hat.com
Cc: linux-kernel@...r.kernel.org, juri.lelli@....com
Subject: [PATCH 3/4] locking/rtmutex: fix open coded check in rt_mutex_waiter_less()
rt_mutex_waiter_less() check of tasks deadlines is open coded. Since this
is subject to wraparound issues, make it use the correct helper.
Cc: Ingo Molnar <mingo@...hat.com>
Cc: Peter Zijlstra <peterz@...radead.org>
Reported-by: Luca Abeni <luca.abeni@...tn.it>
Signed-off-by: Juri Lelli <juri.lelli@....com>
---
kernel/locking/rtmutex.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/kernel/locking/rtmutex.c b/kernel/locking/rtmutex.c
index 5674b07..74e072f 100644
--- a/kernel/locking/rtmutex.c
+++ b/kernel/locking/rtmutex.c
@@ -158,7 +158,8 @@ rt_mutex_waiter_less(struct rt_mutex_waiter *left,
* then right waiter has a dl_prio() too.
*/
if (dl_prio(left->prio))
- return (left->task->dl.deadline < right->task->dl.deadline);
+ return dl_time_before(left->task->dl.deadline,
+ right->task->dl.deadline);
return 0;
}
--
2.2.2
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists