diff options
Diffstat (limited to 'kernel/kexec.c')
-rw-r--r-- | kernel/kexec.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/kernel/kexec.c b/kernel/kexec.c index 2a74f307c5ec..d0d8fca54065 100644 --- a/kernel/kexec.c +++ b/kernel/kexec.c | |||
@@ -47,6 +47,9 @@ u32 vmcoreinfo_note[VMCOREINFO_NOTE_SIZE/4]; | |||
47 | size_t vmcoreinfo_size; | 47 | size_t vmcoreinfo_size; |
48 | size_t vmcoreinfo_max_size = sizeof(vmcoreinfo_data); | 48 | size_t vmcoreinfo_max_size = sizeof(vmcoreinfo_data); |
49 | 49 | ||
50 | /* Flag to indicate we are going to kexec a new kernel */ | ||
51 | bool kexec_in_progress = false; | ||
52 | |||
50 | /* Location of the reserved area for the crash kernel */ | 53 | /* Location of the reserved area for the crash kernel */ |
51 | struct resource crashk_res = { | 54 | struct resource crashk_res = { |
52 | .name = "Crash kernel", | 55 | .name = "Crash kernel", |
@@ -921,7 +924,7 @@ static int kimage_load_segment(struct kimage *image, | |||
921 | * reinitialize them. | 924 | * reinitialize them. |
922 | * | 925 | * |
923 | * - A machine specific part that includes the syscall number | 926 | * - A machine specific part that includes the syscall number |
924 | * and the copies the image to it's final destination. And | 927 | * and then copies the image to it's final destination. And |
925 | * jumps into the image at entry. | 928 | * jumps into the image at entry. |
926 | * | 929 | * |
927 | * kexec does not sync, or unmount filesystems so if you need | 930 | * kexec does not sync, or unmount filesystems so if you need |
@@ -1675,6 +1678,7 @@ int kernel_kexec(void) | |||
1675 | } else | 1678 | } else |
1676 | #endif | 1679 | #endif |
1677 | { | 1680 | { |
1681 | kexec_in_progress = true; | ||
1678 | kernel_restart_prepare(NULL); | 1682 | kernel_restart_prepare(NULL); |
1679 | printk(KERN_EMERG "Starting new kernel\n"); | 1683 | printk(KERN_EMERG "Starting new kernel\n"); |
1680 | machine_shutdown(); | 1684 | machine_shutdown(); |