aboutsummaryrefslogtreecommitdiff
path: root/arch/x86/kernel
diff options
context:
space:
mode:
authorspkal01 <kalligeross@gmail.com>2021-05-17 02:37:28 +0530
committerspkal01 <kalligeross@gmail.com>2021-05-17 02:37:28 +0530
commit93b265ae2eba8d93d0ffa406958547232f3114c8 (patch)
treec2f093aa144f732b5cf7bd8a0b45bf35eda42e1c /arch/x86/kernel
parent0a82617b8fce8994076b518064e7d420af290ea8 (diff)
parent016f4ba70bffb6d02725e778c3989fa542e6d12a (diff)
Merge branch 'android11' of https://github.com/vantoman/kernel_xiaomi_sm6150 into HEADHEADr11.1
Diffstat (limited to 'arch/x86/kernel')
-rw-r--r--arch/x86/kernel/crash.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/x86/kernel/crash.c b/arch/x86/kernel/crash.c
index 44404e2307bb..ce5f8e25f70d 100644
--- a/arch/x86/kernel/crash.c
+++ b/arch/x86/kernel/crash.c
@@ -23,6 +23,7 @@
#include <linux/export.h>
#include <linux/slab.h>
#include <linux/vmalloc.h>
+#include <linux/overflow.h>
#include <asm/processor.h>
#include <asm/hardirq.h>
@@ -565,7 +566,7 @@ int crash_setup_memmap_entries(struct kimage *image, struct boot_params *params)
struct crash_memmap_data cmd;
struct crash_mem *cmem;
- cmem = vzalloc(sizeof(struct crash_mem));
+ cmem = vzalloc(struct_size(cmem, ranges, 1));
if (!cmem)
return -ENOMEM;