diff options
| -rw-r--r-- | arch/x86/include/asm/bootparam_utils.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/arch/x86/include/asm/bootparam_utils.h b/arch/x86/include/asm/bootparam_utils.h index 5b5e9cb774b5..ff808ef4fdb4 100644 --- a/arch/x86/include/asm/bootparam_utils.h +++ b/arch/x86/include/asm/bootparam_utils.h | |||
| @@ -14,13 +14,15 @@ | |||
| 14 | * analysis of kexec-tools; if other broken bootloaders initialize a | 14 | * analysis of kexec-tools; if other broken bootloaders initialize a |
| 15 | * different set of fields we will need to figure out how to disambiguate. | 15 | * different set of fields we will need to figure out how to disambiguate. |
| 16 | * | 16 | * |
| 17 | * Note: efi_info is commonly left uninitialized, but that field has a | ||
| 18 | * private magic, so it is better to leave it unchanged. | ||
| 17 | */ | 19 | */ |
| 18 | static void sanitize_boot_params(struct boot_params *boot_params) | 20 | static void sanitize_boot_params(struct boot_params *boot_params) |
| 19 | { | 21 | { |
| 20 | if (boot_params->sentinel) { | 22 | if (boot_params->sentinel) { |
| 21 | /*fields in boot_params are not valid, clear them */ | 23 | /*fields in boot_params are not valid, clear them */ |
| 22 | memset(&boot_params->olpc_ofw_header, 0, | 24 | memset(&boot_params->olpc_ofw_header, 0, |
| 23 | (char *)&boot_params->alt_mem_k - | 25 | (char *)&boot_params->efi_info - |
| 24 | (char *)&boot_params->olpc_ofw_header); | 26 | (char *)&boot_params->olpc_ofw_header); |
| 25 | memset(&boot_params->kbd_status, 0, | 27 | memset(&boot_params->kbd_status, 0, |
| 26 | (char *)&boot_params->hdr - | 28 | (char *)&boot_params->hdr - |
