Skip to contentSkip to conversation

Patch "brcmfmac: fix memleak due to calling brcmf_sdiod_sgtable_alloc() twice" has been added to the 4.12-stable tree

PATCH [email protected] 1 participant 1 message Aug 7, 2017

Subsystems (2)
lore
Share & tools
lore

[email protected]

author maintainer Applied
#0 lore raw

This is a note to let you know that I've just added the patch titled

brcmfmac: fix memleak due to calling brcmf_sdiod_sgtable_alloc() twice

to the 4.12-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-fix-memleak-due-to-calling-brcmf_sdiod_sgtable_alloc-twice.patch
and it can be found in the queue-4.12 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 5f5d03143de5e0c593da4ab18fc6393c2815e108 Mon Sep 17 00:00:00 2001

From: Arend Van Spriel <[email protected]>
Date: Wed, 26 Jul 2017 13:09:24 +0100
Subject: brcmfmac: fix memleak due to calling brcmf_sdiod_sgtable_alloc() twice

From: Arend Van Spriel <[email protected]>

commit 5f5d03143de5e0c593da4ab18fc6393c2815e108 upstream.

Due to a bugfix in wireless tree and the commit mentioned below a merge was needed which went haywire. So the submitted change resulted in the function brcmf_sdiod_sgtable_alloc() being called twice during the probe thus leaking the memory of the first call.

---
 drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c |    5 -----
 1 file changed, 5 deletions(-)
drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c +0 -5
@@ -4168,11 +4168,6 @@ struct brcmf_sdio *brcmf_sdio_probe(stru
 		goto fail;
 	}
 
-	/* allocate scatter-gather table. sg support
-	 * will be disabled upon allocation failure.
-	 */
-	brcmf_sdiod_sgtable_alloc(bus->sdiodev);
-
 	/* Query the F2 block size, set roundup accordingly */
 	bus->blocksize = bus->sdiodev->func[2]->cur_blksize;
 	bus->roundup = min(max_roundup, bus->blocksize);

Patches currently in stable-queue which might be from [email protected] are

queue-4.12/brcmfmac-fix-memleak-due-to-calling-brcmf_sdiod_sgtable_alloc-twice.patch