[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <tip-0aaafaabfcba8aa991913cd3280a5dbf7f111a2a@git.kernel.org>
Date: Fri, 23 Oct 2015 03:03:35 -0700
From: tip-bot for Peter Zijlstra <tipbot@...or.com>
To: linux-tip-commits@...r.kernel.org
Cc: linux-kernel@...r.kernel.org, wanpeng.li@...mail.com,
luca.abeni@...tn.it, tglx@...utronix.de, mingo@...nel.org,
peterz@...radead.org, hpa@...or.com, torvalds@...ux-foundation.org,
efault@....de, juri.lelli@....com
Subject: [tip:sched/urgent] sched/core: Add missing lockdep_unpin()
annotations
Commit-ID: 0aaafaabfcba8aa991913cd3280a5dbf7f111a2a
Gitweb: http://git.kernel.org/tip/0aaafaabfcba8aa991913cd3280a5dbf7f111a2a
Author: Peter Zijlstra <peterz@...radead.org>
AuthorDate: Fri, 23 Oct 2015 11:50:08 +0200
Committer: Ingo Molnar <mingo@...nel.org>
CommitDate: Fri, 23 Oct 2015 12:02:10 +0200
sched/core: Add missing lockdep_unpin() annotations
Luca and Wanpeng reported two missing annotations that led to
false lockdep complaints. Add the missing annotations.
Reported-by: Luca Abeni <luca.abeni@...tn.it>
Reported-by: Wanpeng Li <wanpeng.li@...mail.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@...radead.org>
Cc: Juri Lelli <juri.lelli@....com>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Mike Galbraith <efault@....de>
Cc: Peter Zijlstra <peterz@...radead.org>
Cc: Thomas Gleixner <tglx@...utronix.de>
Fixes: cbce1a686700 ("sched,lockdep: Employ lock pinning")
Link: http://lkml.kernel.org/r/20151023095008.GY17308@twins.programming.kicks-ass.net
Signed-off-by: Ingo Molnar <mingo@...nel.org>
---
kernel/sched/core.c | 9 ++++++++-
kernel/sched/deadline.c | 9 ++++++++-
2 files changed, 16 insertions(+), 2 deletions(-)
diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index 5bd7d60..bcd214e 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -2366,8 +2366,15 @@ void wake_up_new_task(struct task_struct *p)
trace_sched_wakeup_new(p);
check_preempt_curr(rq, p, WF_FORK);
#ifdef CONFIG_SMP
- if (p->sched_class->task_woken)
+ if (p->sched_class->task_woken) {
+ /*
+ * Nothing relies on rq->lock after this, so its fine to
+ * drop it.
+ */
+ lockdep_unpin_lock(&rq->lock);
p->sched_class->task_woken(rq, p);
+ lockdep_pin_lock(&rq->lock);
+ }
#endif
task_rq_unlock(rq, p, &flags);
}
diff --git a/kernel/sched/deadline.c b/kernel/sched/deadline.c
index 142df26..8b0a15e 100644
--- a/kernel/sched/deadline.c
+++ b/kernel/sched/deadline.c
@@ -668,8 +668,15 @@ static enum hrtimer_restart dl_task_timer(struct hrtimer *timer)
* Queueing this task back might have overloaded rq, check if we need
* to kick someone away.
*/
- if (has_pushable_dl_tasks(rq))
+ if (has_pushable_dl_tasks(rq)) {
+ /*
+ * Nothing relies on rq->lock after this, so its safe to drop
+ * rq->lock.
+ */
+ lockdep_unpin_lock(&rq->lock);
push_dl_task(rq);
+ lockdep_pin_lock(&rq->lock);
+ }
#endif
unlock:
--
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