diff options
author | Purushottam Kushwaha <pkushwah@qti.qualcomm.com> | 2016-07-05 04:14:51 -0400 |
---|---|---|
committer | Johannes Berg <johannes@sipsolutions.net> | 2016-07-06 07:09:02 -0400 |
commit | 6e8ef842223b90a33efd570128bb566a9ae6f5ad (patch) | |
tree | ff244b3e2bf9e2a309e2ea50be75ec0de51794d5 /net/wireless | |
parent | c041778c966c92c964033f1cdfee60a9f2b5e465 (diff) |
nl80211: Move ACL parsing later to avoid a possible memory leak
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.
Cc: stable@vger.kernel.org
Fixes: 34d505193bd10 ("cfg80211: basic support for PBSS network type")
Signed-off-by: Purushottam Kushwaha <pkushwah@qti.qualcomm.com>
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Diffstat (limited to 'net/wireless')
-rw-r--r-- | net/wireless/nl80211.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c index d7599014055d..7d72283901a3 100644 --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c | |||
@@ -3487,16 +3487,16 @@ static int nl80211_start_ap(struct sk_buff *skb, struct genl_info *info) | |||
3487 | params.smps_mode = NL80211_SMPS_OFF; | 3487 | params.smps_mode = NL80211_SMPS_OFF; |
3488 | } | 3488 | } |
3489 | 3489 | ||
3490 | params.pbss = nla_get_flag(info->attrs[NL80211_ATTR_PBSS]); | ||
3491 | if (params.pbss && !rdev->wiphy.bands[NL80211_BAND_60GHZ]) | ||
3492 | return -EOPNOTSUPP; | ||
3493 | |||
3490 | if (info->attrs[NL80211_ATTR_ACL_POLICY]) { | 3494 | if (info->attrs[NL80211_ATTR_ACL_POLICY]) { |
3491 | params.acl = parse_acl_data(&rdev->wiphy, info); | 3495 | params.acl = parse_acl_data(&rdev->wiphy, info); |
3492 | if (IS_ERR(params.acl)) | 3496 | if (IS_ERR(params.acl)) |
3493 | return PTR_ERR(params.acl); | 3497 | return PTR_ERR(params.acl); |
3494 | } | 3498 | } |
3495 | 3499 | ||
3496 | params.pbss = nla_get_flag(info->attrs[NL80211_ATTR_PBSS]); | ||
3497 | if (params.pbss && !rdev->wiphy.bands[NL80211_BAND_60GHZ]) | ||
3498 | return -EOPNOTSUPP; | ||
3499 | |||
3500 | wdev_lock(wdev); | 3500 | wdev_lock(wdev); |
3501 | err = rdev_start_ap(rdev, dev, ¶ms); | 3501 | err = rdev_start_ap(rdev, dev, ¶ms); |
3502 | if (!err) { | 3502 | if (!err) { |