ALSA: timer: Fix mutex deadlock at releasing card
[platform/kernel/linux-rpi.git] / kernel / kexec.c
index 1b018f1..bc933c0 100644 (file)
@@ -206,6 +206,14 @@ static inline int kexec_load_check(unsigned long nr_segments,
                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.
         */