linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH for-4.13] brcmfmac: fix memleak due to calling brcmf_sdiod_sgtable_alloc() twice
@ 2017-07-26 12:09 Arend van Spriel
  2017-07-26 16:05 ` Kalle Valo
  2017-07-27 11:03 ` [for-4.13] " Kalle Valo
  0 siblings, 2 replies; 3+ messages in thread
From: Arend van Spriel @ 2017-07-26 12:09 UTC (permalink / raw)
  To: Kalle Valo; +Cc: linux-wireless, Arend van Spriel

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.

Cc: stable@vger.kernel.org # 4.6.x
Fixes: 4d7928959832 ("brcmfmac: switch to new platform data")
Reported-by: Stefan Wahren <stefan.wahren@i2se.com>
Tested-by: Stefan Wahren <stefan.wahren@i2se.com>
Reviewed-by: Hante Meuleman <hante.meuleman@broadcom.com>
Signed-off-by: Arend van Spriel <arend.vanspriel@broadcom.com>
---
 drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c
index c3ecec6..f355612 100644
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c
@@ -4175,11 +4175,6 @@ struct brcmf_sdio *brcmf_sdio_probe(struct brcmf_sdio_dev *sdiodev)
 		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);
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH for-4.13] brcmfmac: fix memleak due to calling brcmf_sdiod_sgtable_alloc() twice
  2017-07-26 12:09 [PATCH for-4.13] brcmfmac: fix memleak due to calling brcmf_sdiod_sgtable_alloc() twice Arend van Spriel
@ 2017-07-26 16:05 ` Kalle Valo
  2017-07-27 11:03 ` [for-4.13] " Kalle Valo
  1 sibling, 0 replies; 3+ messages in thread
From: Kalle Valo @ 2017-07-26 16:05 UTC (permalink / raw)
  To: Arend van Spriel; +Cc: linux-wireless

Arend van Spriel <arend.vanspriel@broadcom.com> writes:

> 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.
>
> Cc: stable@vger.kernel.org # 4.6.x
> Fixes: 4d7928959832 ("brcmfmac: switch to new platform data")
> Reported-by: Stefan Wahren <stefan.wahren@i2se.com>
> Tested-by: Stefan Wahren <stefan.wahren@i2se.com>
> Reviewed-by: Hante Meuleman <hante.meuleman@broadcom.com>
> Signed-off-by: Arend van Spriel <arend.vanspriel@broadcom.com>

I'll queue this for 4.13.

-- 
Kalle Valo

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [for-4.13] brcmfmac: fix memleak due to calling brcmf_sdiod_sgtable_alloc() twice
  2017-07-26 12:09 [PATCH for-4.13] brcmfmac: fix memleak due to calling brcmf_sdiod_sgtable_alloc() twice Arend van Spriel
  2017-07-26 16:05 ` Kalle Valo
@ 2017-07-27 11:03 ` Kalle Valo
  1 sibling, 0 replies; 3+ messages in thread
From: Kalle Valo @ 2017-07-27 11:03 UTC (permalink / raw)
  To: Arend Van Spriel; +Cc: linux-wireless, Arend van Spriel

Arend Van Spriel <arend.vanspriel@broadcom.com> wrote:

> 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.
> 
> Cc: stable@vger.kernel.org # 4.6.x
> Fixes: 4d7928959832 ("brcmfmac: switch to new platform data")
> Reported-by: Stefan Wahren <stefan.wahren@i2se.com>
> Tested-by: Stefan Wahren <stefan.wahren@i2se.com>
> Reviewed-by: Hante Meuleman <hante.meuleman@broadcom.com>
> Signed-off-by: Arend van Spriel <arend.vanspriel@broadcom.com>

Patch applied to wireless-drivers.git, thanks.

5f5d03143de5 brcmfmac: fix memleak due to calling brcmf_sdiod_sgtable_alloc() twice

-- 
https://patchwork.kernel.org/patch/9864681/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-07-27 11:03 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-07-26 12:09 [PATCH for-4.13] brcmfmac: fix memleak due to calling brcmf_sdiod_sgtable_alloc() twice Arend van Spriel
2017-07-26 16:05 ` Kalle Valo
2017-07-27 11:03 ` [for-4.13] " Kalle Valo

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).