From: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>
To: Johannes Berg <johannes@sipsolutions.net>
Cc: <linville@tuxdriver.com>, <linux-wireless@vger.kernel.org>
Subject: Re: [PATCH] cfg80211: Fix race in bss timeout
Date: Thu, 8 Dec 2011 14:03:00 +0530 [thread overview]
Message-ID: <20111208083258.GA15103@chvasanth-lnx> (raw)
In-Reply-To: <20111207153052.GB12498@chvasanth-lnx>
On Wed, Dec 07, 2011 at 09:00:53PM +0530, Vasanthakumar Thiagarajan wrote:
> > > nl80211_send_roamed(wiphy_to_dev(wdev->wiphy), wdev->netdev, bssid,
> > > req_ie, req_ie_len, resp_ie, resp_ie_len,
> > > GFP_KERNEL);
> > > @@ -615,40 +612,65 @@ void __cfg80211_roamed(struct wireless_dev *wdev,
> > > wdev->wext.prev_bssid_valid = true;
> > > wireless_send_event(wdev->netdev, SIOCGIWAP, &wrqu, NULL);
> > > #endif
> > > +
> > > + return;
> > > +out:
> > > + if (bss)
> > > + cfg80211_put_bss(bss);
> > > }
> >
> > Doesn't that leak the reference if you return? It'll also give you an
> > smatch warning since the function assumes the "bss" pointer that was
> > passed in is not NULL, no?
>
> Oops, sorry, i'll fix it. I may need to run smatch as well.
Wait, actually we are not leaking the bss reference if we return
after a successful roam notification. The reference to the current
bss is released whenever we disconnect from it.
Vasanth
>
next prev parent reply other threads:[~2011-12-08 8:35 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-07 15:11 [PATCH] cfg80211: Fix race in bss timeout Vasanthakumar Thiagarajan
2011-12-07 15:17 ` Johannes Berg
2011-12-07 15:30 ` Vasanthakumar Thiagarajan
2011-12-07 15:37 ` Johannes Berg
2011-12-07 15:53 ` Vasanthakumar Thiagarajan
2011-12-07 15:56 ` Johannes Berg
2011-12-07 16:03 ` Vasanthakumar Thiagarajan
2011-12-08 8:33 ` Vasanthakumar Thiagarajan [this message]
2011-12-08 8:38 ` Johannes Berg
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=20111208083258.GA15103@chvasanth-lnx \
--to=vthiagar@qca.qualcomm.com \
--cc=johannes@sipsolutions.net \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.