[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ce4252db-9b91-d29a-8b45-d3996dd818ff@users.sourceforge.net>
Date: Mon, 5 Sep 2016 10:11:21 +0200
From: SF Markus Elfring <elfring@...rs.sourceforge.net>
To: x86@...nel.org, Andi Kleen <ak@...ux.intel.com>,
Boris Ostrovsky <boris.ostrovsky@...cle.com>,
Borislav Petkov <bp@...e.de>, "H. Peter Anvin" <hpa@...or.com>,
Ingo Molnar <mingo@...hat.com>, Jiri Olsa <jolsa@...hat.com>,
Jürgen Groß <jgross@...e.com>,
Len Brown <len.brown@...el.com>,
Peter Zijlstra <peterz@...radead.org>,
Thomas Gleixner <tglx@...utronix.de>
Cc: LKML <linux-kernel@...r.kernel.org>,
kernel-janitors@...r.kernel.org,
Julia Lawall <julia.lawall@...6.fr>,
Paolo Bonzini <pbonzini@...hat.com>
Subject: [PATCH 2/4] x86/smpboot: Return directly after a failed
kmalloc_array()
From: Markus Elfring <elfring@...rs.sourceforge.net>
Date: Mon, 5 Sep 2016 08:48:32 +0200
Return directly after a memory allocation failed at the beginning.
Signed-off-by: Markus Elfring <elfring@...rs.sourceforge.net>
---
arch/x86/kernel/smpboot.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c
index 36cf27e..2ce06ef 100644
--- a/arch/x86/kernel/smpboot.c
+++ b/arch/x86/kernel/smpboot.c
@@ -352,6 +352,8 @@ static void __init smp_init_package_map(void)
physical_to_logical_pkg = kmalloc_array(max_physical_pkg_id,
sizeof(*physical_to_logical_pkg),
GFP_KERNEL);
+ if (!physical_to_logical_pkg)
+ return;
memset(physical_to_logical_pkg,
0xff,
sizeof(*physical_to_logical_pkg) * max_physical_pkg_id);
--
2.9.3
Powered by blists - more mailing lists