Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1217476
| From | Juri Lelli <juri.lelli@arm.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 3/4] locking/rtmutex: fix open coded check in rt_mutex_waiter_less() |
| Date | 2015-09-02 12:10 +0200 |
| Message-ID | <q4d9o-1Ut-27@gated-at.bofh.it> (permalink) |
| References | <q4d9o-1Ut-25@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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@redhat.com> Cc: Peter Zijlstra <peterz@infradead.org> Reported-by: Luca Abeni <luca.abeni@unitn.it> Signed-off-by: Juri Lelli <juri.lelli@arm.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@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 0/4] sched fixes and clean-ups Juri Lelli <juri.lelli@arm.com> - 2015-09-02 12:10 +0200
[PATCH 3/4] locking/rtmutex: fix open coded check in rt_mutex_waiter_less() Juri Lelli <juri.lelli@arm.com> - 2015-09-02 12:10 +0200
[PATCH 2/4] sched/deadline: unify dl_time_before usage Juri Lelli <juri.lelli@arm.com> - 2015-09-02 12:10 +0200
[PATCH 4/4] sched/rt: make (do_)balance_runtime() return void Juri Lelli <juri.lelli@arm.com> - 2015-09-02 12:10 +0200
[PATCH 1/4] sched/{cpuset,core}: restore complete root_domain status across hotplug Juri Lelli <juri.lelli@arm.com> - 2015-09-02 12:10 +0200
csiph-web