[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <tip-f52405757e4e9bddd868d6b8ca501d58f292969f@git.kernel.org>
Date: Wed, 23 Sep 2015 01:47:17 -0700
From: tip-bot for Juri Lelli <tipbot@...or.com>
To: linux-tip-commits@...r.kernel.org
Cc: peterz@...radead.org, hpa@...or.com, torvalds@...ux-foundation.org,
efault@....de, luca.abeni@...tn.it, linux-kernel@...r.kernel.org,
mingo@...nel.org, juri.lelli@....com, tglx@...utronix.de
Subject: [tip:sched/core] sched/deadline, locking/rtmutex:
Fix open coded check in rt_mutex_waiter_less()
Commit-ID: f52405757e4e9bddd868d6b8ca501d58f292969f
Gitweb: http://git.kernel.org/tip/f52405757e4e9bddd868d6b8ca501d58f292969f
Author: Juri Lelli <juri.lelli@....com>
AuthorDate: Wed, 2 Sep 2015 11:01:35 +0100
Committer: Ingo Molnar <mingo@...nel.org>
CommitDate: Wed, 23 Sep 2015 09:51:25 +0200
sched/deadline, locking/rtmutex: Fix open coded check in rt_mutex_waiter_less()
rt_mutex_waiter_less() check of task deadlines is open coded. Since this
is subject to wraparound bugs, make it use the correct helper.
Reported-by: Luca Abeni <luca.abeni@...tn.it>
Signed-off-by: Juri Lelli <juri.lelli@....com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@...radead.org>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Mike Galbraith <efault@....de>
Cc: Peter Zijlstra <peterz@...radead.org>
Cc: Thomas Gleixner <tglx@...utronix.de>
Link: http://lkml.kernel.org/r/1441188096-23021-4-git-send-email-juri.lelli@arm.com
Signed-off-by: Ingo Molnar <mingo@...nel.org>
---
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 7781d80..35e9bfc 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;
}
--
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