* Patch "brcmfmac: fix memory leak in brcmf_fill_bss_param" has been added to the 4.7-stable tree
@ 2016-10-20 14:23 gregkh
0 siblings, 0 replies; only message in thread
From: gregkh @ 2016-10-20 14:23 UTC (permalink / raw)
To: rafal, arend.vanspriel, gregkh, kvalo; +Cc: stable, stable-commits
This is a note to let you know that I've just added the patch titled
brcmfmac: fix memory leak in brcmf_fill_bss_param
to the 4.7-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-memory-leak-in-brcmf_fill_bss_param.patch
and it can be found in the queue-4.7 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 23e9c128adb2038c27a424a5f91136e7fa3e0dc6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal@milecki.pl>
Date: Wed, 21 Sep 2016 08:23:24 +0200
Subject: brcmfmac: fix memory leak in brcmf_fill_bss_param
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
From: Rafał Miłecki <rafal@milecki.pl>
commit 23e9c128adb2038c27a424a5f91136e7fa3e0dc6 upstream.
This function is called from get_station callback which means that every
time user space was getting/dumping station(s) we were leaking 2 KiB.
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Fixes: 1f0dc59a6de ("brcmfmac: rework .get_station() callback")
Acked-by: Arend van Spriel <arend.vanspriel@broadcom.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
@@ -2473,7 +2473,7 @@ static void brcmf_fill_bss_param(struct
WL_BSS_INFO_MAX);
if (err) {
brcmf_err("Failed to get bss info (%d)\n", err);
- return;
+ goto out_kfree;
}
si->filled |= BIT(NL80211_STA_INFO_BSS_PARAM);
si->bss_param.beacon_interval = le16_to_cpu(buf->bss_le.beacon_period);
@@ -2485,6 +2485,9 @@ static void brcmf_fill_bss_param(struct
si->bss_param.flags |= BSS_PARAM_FLAGS_SHORT_PREAMBLE;
if (capability & WLAN_CAPABILITY_SHORT_SLOT_TIME)
si->bss_param.flags |= BSS_PARAM_FLAGS_SHORT_SLOT_TIME;
+
+out_kfree:
+ kfree(buf);
}
static s32
Patches currently in stable-queue which might be from rafal@milecki.pl are
queue-4.7/brcmfmac-use-correct-skb-freeing-helper-when-deleting-flowring.patch
queue-4.7/brcmfmac-fix-memory-leak-in-brcmf_fill_bss_param.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2016-10-20 14:23 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-10-20 14:23 Patch "brcmfmac: fix memory leak in brcmf_fill_bss_param" has been added to the 4.7-stable tree gregkh
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).