From: Tim Gardner <tim.gard...@canonical.com>

arch/x86/kernel/cpu/microcode/intel.c: In function 'save_mc_for_early':
arch/x86/kernel/cpu/microcode/intel.c:516:1: warning: the frame size of 1032 
bytes is larger than 1024 bytes [-Wframe-larger-than=]

gcc version 5.3.1 20160101 (Ubuntu 5.3.1-5ubuntu1)

Cc: Borislav Petkov <b...@alien8.de>
Cc: Thomas Gleixner <t...@linutronix.de>
Cc: Ingo Molnar <mi...@redhat.com>
Cc: "H. Peter Anvin" <h...@zytor.com>
Signed-off-by: Tim Gardner <tim.gard...@canonical.com>
---
 arch/x86/kernel/cpu/microcode/intel.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/arch/x86/kernel/cpu/microcode/intel.c 
b/arch/x86/kernel/cpu/microcode/intel.c
index ce47402..bee5e84 100644
--- a/arch/x86/kernel/cpu/microcode/intel.c
+++ b/arch/x86/kernel/cpu/microcode/intel.c
@@ -463,13 +463,18 @@ static DEFINE_MUTEX(x86_cpu_microcode_mutex);
  */
 int save_mc_for_early(u8 *mc)
 {
-       struct microcode_intel *mc_saved_tmp[MAX_UCODE_COUNT];
+       struct microcode_intel **mc_saved_tmp;
        unsigned int mc_saved_count_init;
        unsigned int mc_saved_count;
        struct microcode_intel **mc_saved;
        int ret = 0;
        int i;
 
+       mc_saved_tmp = kcalloc(MAX_UCODE_COUNT, sizeof(*mc_saved_tmp),
+               GFP_KERNEL);
+       if (!mc_saved_tmp)
+               return -ENOMEM;
+
        /*
         * Hold hotplug lock so mc_saved_data is not accessed by a CPU in
         * hotplug.
@@ -512,6 +517,7 @@ int save_mc_for_early(u8 *mc)
 out:
        mutex_unlock(&x86_cpu_microcode_mutex);
 
+       kfree(mc_saved_tmp);
        return ret;
 }
 EXPORT_SYMBOL_GPL(save_mc_for_early);
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to