From: Johannes Berg <johannes@sipsolutions.net>
To: Ujjal Roy <royujjal@gmail.com>
Cc: "John W. Linville" <linville@tuxdriver.com>,
linux-wireless@vger.kernel.org
Subject: Re: [PATCH] cfg80211: fix WARN_ON for re-association to the expired BSS
Date: Tue, 03 Dec 2013 15:30:14 +0100 [thread overview]
Message-ID: <1386081014.4393.31.camel@jlt4.sipsolutions.net> (raw)
In-Reply-To: <1385883096-7143-1-git-send-email-royujjal@gmail.com> (sfid-20131201_083145_260096_779C94CC)
On Sun, 2013-12-01 at 13:01 +0530, Ujjal Roy wrote:
> + if (!bss)
> + save_bss = cfg80211_get_bss(wdev->wiphy, NULL, bssid,
> + wdev->ssid, wdev->ssid_len,
> + WLAN_CAPABILITY_ESS,
> + WLAN_CAPABILITY_ESS);
> if (wdev->current_bss) {
> cfg80211_unhold_bss(wdev->current_bss);
> cfg80211_put_bss(wdev->wiphy, &wdev->current_bss->pub);
> @@ -651,10 +657,7 @@ void __cfg80211_connect_result(struct net_device *dev, const u8 *bssid,
>
> if (!bss) {
> WARN_ON_ONCE(!wiphy_to_dev(wdev->wiphy)->ops->connect);
> - bss = cfg80211_get_bss(wdev->wiphy, NULL, bssid,
> - wdev->ssid, wdev->ssid_len,
> - WLAN_CAPABILITY_ESS,
> - WLAN_CAPABILITY_ESS);
> + bss = save_bss;
In an unsuccessful result case, this leaks the BSS struct. I'd prefer to
reshuffle the code a bit to not need a separate save_bss variable, but I
don't immediately see an easy way to do that.
johannes
next prev parent reply other threads:[~2013-12-03 14:30 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-01 7:31 [PATCH] cfg80211: fix WARN_ON for re-association to the expired BSS Ujjal Roy
2013-12-01 9:32 ` Johannes Berg
2013-12-02 5:19 ` Ujjal Roy
2013-12-03 6:24 ` Ujjal Roy
2013-12-03 8:07 ` Johannes Berg
2013-12-03 14:25 ` Johannes Berg
2013-12-05 9:43 ` Ujjal Roy
2013-12-03 14:30 ` Johannes Berg [this message]
2013-12-04 11:55 ` Ujjal Roy
2013-12-05 13:51 ` [PATCH v2] " Ujjal Roy
-- strict thread matches above, loose matches on Subject: below --
2013-12-04 11:57 [PATCH] " Ujjal Roy
2013-12-05 14:02 ` Johannes Berg
2013-12-01 7:26 Ujjal Roy
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1386081014.4393.31.camel@jlt4.sipsolutions.net \
--to=johannes@sipsolutions.net \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
--cc=royujjal@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox