ubsan: move cc-option tests into Kconfig
[linux-2.6-microblaze.git] / lib / smp_processor_id.c
index 525222e..1c1dbd3 100644 (file)
@@ -26,6 +26,11 @@ unsigned int check_preemption_disabled(const char *what1, const char *what2)
        if (current->nr_cpus_allowed == 1)
                goto out;
 
+#ifdef CONFIG_SMP
+       if (current->migration_disabled)
+               goto out;
+#endif
+
        /*
         * It is valid to assume CPU-locality during early bootup:
         */