Merge branch 'linus' into core/locking
[linux-2.6.git] / kernel / sched.c
index 50a21f964679ec42eee299cab7f7f86edc26a408..2a106b6b78b09006f75274defb2057b6e7a428e7 100644 (file)
@@ -4336,7 +4336,7 @@ void __kprobes sub_preempt_count(int val)
        /*
         * Underflow?
         */
-       if (DEBUG_LOCKS_WARN_ON(val > preempt_count()))
+       if (DEBUG_LOCKS_WARN_ON(val > preempt_count() - (!!kernel_locked())))
                return;
        /*
         * Is the spinlock portion underflowing?