* [tip: x86/platform] x86/platform/uv: Fix kmalloc() NULL check routine
@ 2019-09-06 5:42 tip-bot2 for Austin Kim
0 siblings, 0 replies; only message in thread
From: tip-bot2 for Austin Kim @ 2019-09-06 5:42 UTC (permalink / raw)
To: linux-tip-commits; +Cc: Ingo Molnar, Borislav Petkov, linux-kernel
The following commit has been merged into the x86/platform branch of tip:
Commit-ID: 864b23f0169d5bff677e8443a7a90dfd6b090afc
Gitweb: https://git.kernel.org/tip/864b23f0169d5bff677e8443a7a90dfd6b090afc
Author: Austin Kim <austindh.kim@gmail.com>
AuthorDate: Fri, 06 Sep 2019 08:29:51 +09:00
Committer: Ingo Molnar <mingo@kernel.org>
CommitterDate: Fri, 06 Sep 2019 07:36:16 +02:00
x86/platform/uv: Fix kmalloc() NULL check routine
The result of kmalloc() should have been checked ahead of below statement:
pqp = (struct bau_pq_entry *)vp;
Move BUG_ON(!vp) before above statement.
Signed-off-by: Austin Kim <austindh.kim@gmail.com>
Cc: Dimitri Sivanich <dimitri.sivanich@hpe.com>
Cc: Hedi Berriche <hedi.berriche@hpe.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Mike Travis <mike.travis@hpe.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Russ Anderson <russ.anderson@hpe.com>
Cc: Steve Wahl <steve.wahl@hpe.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: allison@lohutok.net
Cc: andy@infradead.org
Cc: armijn@tjaldur.nl
Cc: bp@alien8.de
Cc: dvhart@infradead.org
Cc: gregkh@linuxfoundation.org
Cc: hpa@zytor.com
Cc: kjlu@umn.edu
Cc: platform-driver-x86@vger.kernel.org
Link: https://lkml.kernel.org/r/20190905232951.GA28779@LGEARND20B15
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
arch/x86/platform/uv/tlb_uv.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/x86/platform/uv/tlb_uv.c b/arch/x86/platform/uv/tlb_uv.c
index 20c389a..5f0a96b 100644
--- a/arch/x86/platform/uv/tlb_uv.c
+++ b/arch/x86/platform/uv/tlb_uv.c
@@ -1804,9 +1804,9 @@ static void pq_init(int node, int pnode)
plsize = (DEST_Q_SIZE + 1) * sizeof(struct bau_pq_entry);
vp = kmalloc_node(plsize, GFP_KERNEL, node);
- pqp = (struct bau_pq_entry *)vp;
- BUG_ON(!pqp);
+ BUG_ON(!vp);
+ pqp = (struct bau_pq_entry *)vp;
cp = (char *)pqp + 31;
pqp = (struct bau_pq_entry *)(((unsigned long)cp >> 5) << 5);
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2019-09-06 5:42 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-06 5:42 [tip: x86/platform] x86/platform/uv: Fix kmalloc() NULL check routine tip-bot2 for Austin Kim
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).