Merge commit 'v2.6.28-rc7' into core/locking
[linux-2.6-block.git] / kernel / sched.c
index b7480fb5c3dc21a7bf6513a978cf0ed2e8c19a8f..1b8f8c3aecc435f9aeb30ab0c1412743491b75a1 100644 (file)
@@ -4339,7 +4339,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?