kexec: factor out kexec_load_permitted
[linux-2.6-block.git] / kernel / kexec.c
index cb8e6e6f983c7900e9950ed2e0b719ff4a524f03..ce1bca874a8d063449ca94fa793efba9bc4fceaa 100644 (file)
@@ -193,7 +193,7 @@ static inline int kexec_load_check(unsigned long nr_segments,
        int result;
 
        /* We only trust the superuser with rebooting the system. */
-       if (!capable(CAP_SYS_BOOT) || kexec_load_disabled)
+       if (!kexec_load_permitted())
                return -EPERM;
 
        /* Permit LSMs and IMA to fail the kexec */