Patch "MIPS: ath25: Check for kzalloc allocation failure" has been added to the 4.15-stable tree
Subsystems (2)
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.15-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.15 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From
1b22b4b28fd5fbc51855219e3238b3ab81da8466Mon Sep 17 00:00:00 2001
From: Colin Ian King <[email protected]>
Date: Thu, 22 Feb 2018 17:50:12 +0000
Subject: MIPS: ath25: Check for kzalloc allocation failure
From: Colin Ian King <[email protected]>
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.
Patchwork: https://patchwork.linux-mips.org/patch/18657/
--- arch/mips/ath25/board.c | 2 ++ 1 file changed, 2 insertions(+)
arch/mips/ath25/board.c +2 -0
@@ -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 [email protected] are
queue-4.15/mips-ath25-check-for-kzalloc-allocation-failure.patch queue-4.15/mips-octeon-irq-check-for-null-return-on-kzalloc-allocation.patch