sched/fair: fix start_cpu lockdep warning
authorTao Huang <huangtao@rock-chips.com>
Mon, 7 Aug 2017 08:56:18 +0000 (16:56 +0800)
committerTao Huang <huangtao@rock-chips.com>
Mon, 7 Aug 2017 08:59:52 +0000 (16:59 +0800)
Should warn on !rcu_read_lock_sched_held.

Change-Id: Id4b38e8c2dee83aedb4b7a2f19588b31b07c1116
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
kernel/sched/fair.c

index 84c0d8084dc5a5a3a49cac0641442639c403df57..07864e77856cc42fbf0b575893c98c29d0530e9b 100644 (file)
@@ -6185,7 +6185,7 @@ static int start_cpu(bool boosted)
 {
        struct root_domain *rd = cpu_rq(smp_processor_id())->rd;
 
-       RCU_LOCKDEP_WARN(rcu_read_lock_sched_held(),
+       RCU_LOCKDEP_WARN(!rcu_read_lock_sched_held(),
                           "sched RCU must be held");
 
        return boosted ? rd->max_cap_orig_cpu : rd->min_cap_orig_cpu;