From: Juri Lelli <juri.lelli@arm.com>
To: peterz@infradead.org, mingo@redhat.com
Cc: linux-kernel@vger.kernel.org, juri.lelli@arm.com
Subject: [PATCH 3/4] locking/rtmutex: fix open coded check in rt_mutex_waiter_less()
Date: Wed, 2 Sep 2015 11:01:35 +0100 [thread overview]
Message-ID: <1441188096-23021-4-git-send-email-juri.lelli@arm.com> (raw)
In-Reply-To: <1441188096-23021-1-git-send-email-juri.lelli@arm.com>
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
next prev parent reply other threads:[~2015-09-02 10:01 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-02 10:01 [PATCH 0/4] sched fixes and clean-ups Juri Lelli
2015-09-02 10:01 ` [PATCH 1/4] sched/{cpuset,core}: restore complete root_domain status across hotplug Juri Lelli
2015-09-09 15:11 ` Peter Zijlstra
2015-09-10 9:03 ` Juri Lelli
2015-09-02 10:01 ` [PATCH 2/4] sched/deadline: unify dl_time_before usage Juri Lelli
2015-09-23 8:46 ` [tip:sched/core] sched/deadline: Unify dl_time_before() usage tip-bot for Juri Lelli
2015-09-02 10:01 ` Juri Lelli [this message]
2015-09-23 8:47 ` [tip:sched/core] sched/deadline, locking/rtmutex: Fix open coded check in rt_mutex_waiter_less() tip-bot for Juri Lelli
2015-09-02 10:01 ` [PATCH 4/4] sched/rt: make (do_)balance_runtime() return void Juri Lelli
2015-09-23 8:47 ` [tip:sched/core] sched/rt: Make " tip-bot for Juri Lelli
2015-09-18 9:02 ` [PATCH 0/4] sched fixes and clean-ups Juri Lelli
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1441188096-23021-4-git-send-email-juri.lelli@arm.com \
--to=juri.lelli@arm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®