]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blobdiff - kernel/kexec.c
Merge tag 'md/3.14' of git://neil.brown.name/md
[mirror_ubuntu-artful-kernel.git] / kernel / kexec.c
index 9c970167e4025f01be6bd696499eec2504c72ef7..ac738781d35686601e793a6901f7d677086357c0 100644 (file)
@@ -932,6 +932,7 @@ static int kimage_load_segment(struct kimage *image,
  */
 struct kimage *kexec_image;
 struct kimage *kexec_crash_image;
+int kexec_load_disabled;
 
 static DEFINE_MUTEX(kexec_mutex);
 
@@ -942,7 +943,7 @@ SYSCALL_DEFINE4(kexec_load, unsigned long, entry, unsigned long, nr_segments,
        int result;
 
        /* We only trust the superuser with rebooting the system. */
-       if (!capable(CAP_SYS_BOOT))
+       if (!capable(CAP_SYS_BOOT) || kexec_load_disabled)
                return -EPERM;
 
        /*