Permalink
Browse files

sched-dl: add rcu_read_unlock if a best_cpu is returned inside find_l…

…ater_rq
  • Loading branch information...
1 parent d801c43 commit 96df7578d0d99501a8dff5a68fc53ee1f36e1b74 @jlelli committed Jan 24, 2013
Showing with 6 additions and 2 deletions.
  1. +6 −2 kernel/sched/deadline.c
@@ -1171,16 +1171,20 @@ static int find_later_rq(struct task_struct *task)
* cheaper than migrating.
*/
if (this_cpu != -1 &&
- cpumask_test_cpu(this_cpu, sched_domain_span(sd)))
+ cpumask_test_cpu(this_cpu, sched_domain_span(sd))) {
+ rcu_read_unlock();
return this_cpu;
+ }
/*
* Last chance: if best_cpu is valid and is
* in the mask, that becomes our choice.
*/
if (best_cpu < nr_cpu_ids &&
- cpumask_test_cpu(best_cpu, sched_domain_span(sd)))
+ cpumask_test_cpu(best_cpu, sched_domain_span(sd))) {
+ rcu_read_unlock();
return best_cpu;
+ }
}
}
rcu_read_unlock();

0 comments on commit 96df757

Please sign in to comment.