diff options
author | Rafał Miłecki <rafal@milecki.pl> | 2017-02-02 09:29:21 +0100 |
---|---|---|
committer | Rafał Miłecki <rafal@milecki.pl> | 2017-02-02 09:51:34 +0100 |
commit | 2a1d8c1f7931ceb0c473f535230e44d87cd315c5 (patch) | |
tree | 40e6aed8142429e7cf60b26a2304f223289afcdf /package/kernel/mac80211/patches/358-0001-brcmfmac-fix-memory-leak-in-brcmf_cfg80211_attach.patch | |
parent | 863a06b0a4ed3939d81fb49d3b8a88db9e807d41 (diff) | |
download | upstream-2a1d8c1f7931ceb0c473f535230e44d87cd315c5.tar.gz upstream-2a1d8c1f7931ceb0c473f535230e44d87cd315c5.tar.bz2 upstream-2a1d8c1f7931ceb0c473f535230e44d87cd315c5.zip |
mac80211: brcmfmac: backport 4.10 fixes & typo fix
This includes memory leak fix in initialization path.
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Diffstat (limited to 'package/kernel/mac80211/patches/358-0001-brcmfmac-fix-memory-leak-in-brcmf_cfg80211_attach.patch')
-rw-r--r-- | package/kernel/mac80211/patches/358-0001-brcmfmac-fix-memory-leak-in-brcmf_cfg80211_attach.patch | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/package/kernel/mac80211/patches/358-0001-brcmfmac-fix-memory-leak-in-brcmf_cfg80211_attach.patch b/package/kernel/mac80211/patches/358-0001-brcmfmac-fix-memory-leak-in-brcmf_cfg80211_attach.patch new file mode 100644 index 0000000000..005db2b786 --- /dev/null +++ b/package/kernel/mac80211/patches/358-0001-brcmfmac-fix-memory-leak-in-brcmf_cfg80211_attach.patch @@ -0,0 +1,47 @@ +From cb853da3a368c40300a0e940f86be582037bb082 Mon Sep 17 00:00:00 2001 +From: Arend Van Spriel <arend.vanspriel@broadcom.com> +Date: Fri, 9 Dec 2016 11:34:13 +0000 +Subject: [PATCH] brcmfmac: fix memory leak in brcmf_cfg80211_attach() + +In brcmf_cfg80211_attach() there was one error path not properly +handled as it leaked memory allocated in brcmf_btcoex_attach(). + +Reviewed-by: Hante Meuleman <hante.meuleman@broadcom.com> +Reviewed-by: Pieter-Paul Giesberts <pieter-paul.giesberts@broadcom.com> +Reviewed-by: Franky Lin <franky.lin@broadcom.com> +Signed-off-by: Arend van Spriel <arend.vanspriel@broadcom.com> +Signed-off-by: Kalle Valo <kvalo@codeaurora.org> +--- + drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c | 7 +++++-- + 1 file changed, 5 insertions(+), 2 deletions(-) + +--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c ++++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c +@@ -6866,7 +6866,7 @@ struct brcmf_cfg80211_info *brcmf_cfg802 + + err = brcmf_p2p_attach(cfg, p2pdev_forced); + if (err) { +- brcmf_err("P2P initilisation failed (%d)\n", err); ++ brcmf_err("P2P initialisation failed (%d)\n", err); + goto wiphy_unreg_out; + } + err = brcmf_btcoex_attach(cfg); +@@ -6891,7 +6891,7 @@ struct brcmf_cfg80211_info *brcmf_cfg802 + err = brcmf_fweh_activate_events(ifp); + if (err) { + brcmf_err("FWEH activation failed (%d)\n", err); +- goto wiphy_unreg_out; ++ goto detach; + } + + /* Fill in some of the advertised nl80211 supported features */ +@@ -6906,6 +6906,9 @@ struct brcmf_cfg80211_info *brcmf_cfg802 + + return cfg; + ++detach: ++ brcmf_btcoex_detach(cfg); ++ brcmf_p2p_detach(&cfg->p2p); + wiphy_unreg_out: + wiphy_unregister(cfg->wiphy); + priv_out: |