* Patch "MIPS: ath25: Check for kzalloc allocation failure" has been added to the 4.14-stable tree
@ 2018-03-12 15:41 gregkh
0 siblings, 0 replies; only message in thread
From: gregkh @ 2018-03-12 15:41 UTC (permalink / raw
To: colin.king, gregkh, jhogan, ralf, stable; +Cc: stable, stable-commits
This is a note to let you know that I've just added the patch titled
MIPS: ath25: Check for kzalloc allocation failure
to the 4.14-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
mips-ath25-check-for-kzalloc-allocation-failure.patch
and it can be found in the queue-4.14 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.
>From 1b22b4b28fd5fbc51855219e3238b3ab81da8466 Mon Sep 17 00:00:00 2001
From: Colin Ian King <colin.king@canonical.com>
Date: Thu, 22 Feb 2018 17:50:12 +0000
Subject: MIPS: ath25: Check for kzalloc allocation failure
From: Colin Ian King <colin.king@canonical.com>
commit 1b22b4b28fd5fbc51855219e3238b3ab81da8466 upstream.
Currently there is no null check on a failed allocation of board_data,
and hence a null pointer dereference will occurr. Fix this by checking
for the out of memory null pointer.
Fixes: a7473717483e ("MIPS: ath25: add board configuration detection")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: linux-mips@linux-mips.org
Cc: <stable@vger.kernel.org> # 3.19+
Patchwork: https://patchwork.linux-mips.org/patch/18657/
Signed-off-by: James Hogan <jhogan@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
arch/mips/ath25/board.c | 2 ++
1 file changed, 2 insertions(+)
--- a/arch/mips/ath25/board.c
+++ b/arch/mips/ath25/board.c
@@ -135,6 +135,8 @@ int __init ath25_find_config(phys_addr_t
}
board_data = kzalloc(BOARD_CONFIG_BUFSZ, GFP_KERNEL);
+ if (!board_data)
+ goto error;
ath25_board.config = (struct ath25_boarddata *)board_data;
memcpy_fromio(board_data, bcfg, 0x100);
if (broken_boarddata) {
Patches currently in stable-queue which might be from colin.king@canonical.com are
queue-4.14/mips-ath25-check-for-kzalloc-allocation-failure.patch
queue-4.14/mips-octeon-irq-check-for-null-return-on-kzalloc-allocation.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2018-03-12 15:42 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-03-12 15:41 Patch "MIPS: ath25: Check for kzalloc allocation failure" has been added to the 4.14-stable tree gregkh
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.