x86/asm: Replace WEAK uses by SYM_INNER_LABEL_ALIGN
[linux-2.6-block.git] / kernel / kexec.c
index 1b018f1a6e0d85647e4cc5e6646cacc15e5a2bee..bc933c0db9bf019aefa7c5bc7061bc2541fb2a00 100644 (file)
@@ -205,6 +205,14 @@ static inline int kexec_load_check(unsigned long nr_segments,
        if (result < 0)
                return result;
 
+       /*
+        * kexec can be used to circumvent module loading restrictions, so
+        * prevent loading in that case
+        */
+       result = security_locked_down(LOCKDOWN_KEXEC);
+       if (result)
+               return result;
+
        /*
         * Verify we have a legal set of flags
         * This leaves us room for future extensions.