* [PATCH] nl80211: Move ACL parsing later to avoid a possible memory leak
@ 2016-07-05 8:14 Purushottam Kushwaha
2016-07-06 11:09 ` Johannes Berg
0 siblings, 1 reply; 2+ messages in thread
From: Purushottam Kushwaha @ 2016-07-05 8:14 UTC (permalink / raw)
To: johannes; +Cc: linux-wireless, jouni, usdutt, pkushwah
No support for pbss results in a memory leak for the acl_data
(if parse_acl_data succeeds). Fix this by moving the ACL parsing later.
Fixes: 34d505193bd10 ("cfg80211: basic support for PBSS network type")
Signed-off-by: Purushottam Kushwaha <pkushwah@qti.qualcomm.com>
---
net/wireless/nl80211.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index 244d552..c11dccf 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -3532,16 +3532,16 @@ static int nl80211_start_ap(struct sk_buff *skb, struct genl_info *info)
params.smps_mode = NL80211_SMPS_OFF;
}
+ params.pbss = nla_get_flag(info->attrs[NL80211_ATTR_PBSS]);
+ if (params.pbss && !rdev->wiphy.bands[NL80211_BAND_60GHZ])
+ return -EOPNOTSUPP;
+
if (info->attrs[NL80211_ATTR_ACL_POLICY]) {
params.acl = parse_acl_data(&rdev->wiphy, info);
if (IS_ERR(params.acl))
return PTR_ERR(params.acl);
}
- params.pbss = nla_get_flag(info->attrs[NL80211_ATTR_PBSS]);
- if (params.pbss && !rdev->wiphy.bands[NL80211_BAND_60GHZ])
- return -EOPNOTSUPP;
-
wdev_lock(wdev);
err = rdev_start_ap(rdev, dev, ¶ms);
if (!err) {
--
1.9.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] nl80211: Move ACL parsing later to avoid a possible memory leak
2016-07-05 8:14 [PATCH] nl80211: Move ACL parsing later to avoid a possible memory leak Purushottam Kushwaha
@ 2016-07-06 11:09 ` Johannes Berg
0 siblings, 0 replies; 2+ messages in thread
From: Johannes Berg @ 2016-07-06 11:09 UTC (permalink / raw)
To: Purushottam Kushwaha; +Cc: linux-wireless, jouni, usdutt
On Tue, 2016-07-05 at 13:44 +0530, Purushottam Kushwaha wrote:
> No support for pbss results in a memory leak for the acl_data
> (if parse_acl_data succeeds). Fix this by moving the ACL parsing
> later.
>
Applied, thanks.
johannes
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-07-06 11:09 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-07-05 8:14 [PATCH] nl80211: Move ACL parsing later to avoid a possible memory leak Purushottam Kushwaha
2016-07-06 11:09 ` Johannes Berg
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).