Patch "brcmfmac: check brcmf_bus_get_memdump result for error" has been added to the 4.9-stable tree
Subsystems (2)
This is a note to let you know that I've just added the patch titled
brcmfmac: check brcmf_bus_get_memdump result for error
to the 4.9-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:
brcmfmac-check-brcmf_bus_get_memdump-result-for-error.patch
and it can be found in the queue-4.9 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 foo@baz Mon Nov 6 10:07:35 CET 2017
From: Rafał Miłecki <[email protected]>
Date: Sat, 7 Oct 2017 22:36:55 +0000
Subject: brcmfmac: check brcmf_bus_get_memdump result for error
From: Rafał Miłecki <[email protected]>
[ Upstream commit f4737a62033d7f3e0db740c449fc62119da7ab8a ]
This method may be unsupported (see: USB bus) or may just fail (see:
SDIO bus).
While at it rework logic in brcmf_sdio_bus_get_memdump function to avoid too many conditional code nesting levels.
--- drivers/net/wireless/broadcom/brcm80211/brcmfmac/debug.c | 23 ++++++++++----- 1 file changed, 16 insertions(+), 7 deletions(-)
drivers/net/wireless/broadcom/brcm80211/brcmfmac/debug.c +16 -7
@@ -32,16 +32,25 @@ static int brcmf_debug_create_memdump(st {void *dump;size_t ramsize; +int err; ramsize =brcmf_bus_get_ramsize (bus); -if (ramsize) { - dump =vzalloc (len + ramsize); -if (!dump) -return -ENOMEM ; -memcpy (dump, data, len); -brcmf_bus_get_memdump (bus, dump + len, ramsize); -dev_coredumpv (bus->dev, dump, len + ramsize,GFP_KERNEL ); +if (!ramsize) +return -ENOTSUPP ; + + dump =vzalloc (len + ramsize); +if (!dump) +return -ENOMEM ; + +memcpy (dump, data, len); + err =brcmf_bus_get_memdump (bus, dump + len, ramsize); +if (err) { +vfree (dump); +return err; } + +dev_coredumpv (bus->dev, dump, len + ramsize,GFP_KERNEL ); +return 0 ; }
Patches currently in stable-queue which might be from [email protected] are
queue-4.9/brcmfmac-check-brcmf_bus_get_memdump-result-for-error.patch