summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTodd Kjos <tkjos@google.com>2016-07-04 15:04:45 +0100
committerJohn Stultz <john.stultz@linaro.org>2016-08-11 14:26:47 -0700
commit8935b6b4d230ae7969ccdfaf7baf09d818f88c8b (patch)
tree4e9b005de85e45ff35a0e7739370a8cc8dea9d58
parent740d312ce8aae83956ed1b34b8a4e72b60b04a8f (diff)
FIXUP: sched: Fix double-release of spinlock in move_queued_task
BUG: 29519455 Change-Id: I4d1c27a1b4bcbba03d4b175d170cfe1701a90ffd
-rw-r--r--kernel/sched/sched.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h
index 3111d74a5a85..4e2e44e3cc7b 100644
--- a/kernel/sched/sched.h
+++ b/kernel/sched/sched.h
@@ -1832,7 +1832,8 @@ static inline int double_lock_balance(struct rq *this_rq, struct rq *busiest)
static inline void double_unlock_balance(struct rq *this_rq, struct rq *busiest)
__releases(busiest->lock)
{
- raw_spin_unlock(&busiest->lock);
+ if (this_rq != busiest)
+ raw_spin_unlock(&busiest->lock);
lock_set_subclass(&this_rq->lock.dep_map, 0, _RET_IP_);
}