From: Simon Wunderlich <simon.wunderlich@s2003.tu-chemnitz.de>
To: Simon Wunderlich <simon.wunderlich@s2003.tu-chemnitz.de>
Cc: linux-wireless@vger.kernel.org, linville@tuxdriver.com,
Simon Wunderlich <siwu@hrz.tu-chemnitz.de>,
Ignacy Gawedzki <i@lri.fr>,
Johannes Berg <johannes@sipsolutions.net>
Subject: Re: [PATCHv3] mac80211: deinitialize ibss-internals after emptiness check
Date: Tue, 13 Nov 2012 18:55:47 +0100 [thread overview]
Message-ID: <20121113175547.GA19223@pandem0nium> (raw)
In-Reply-To: <1352828583-19502-1-git-send-email-siwu@hrz.tu-chemnitz.de>
[-- Attachment #1: Type: text/plain, Size: 1803 bytes --]
Whoops, there was actually never a version one or two posted here ...
Please consider this version 1.
Sorry,
Simon
On Tue, Nov 13, 2012 at 06:43:03PM +0100, Simon Wunderlich wrote:
> The check whether the IBSS is active and can be removed should be
> performed before deinitializing the fields used for the check/search.
> Otherwise, the configured BSS will not be found and removed properly.
>
> To make it more clear for the future, rename sdata->u.ibss to the
> local pointer ifibss which is used within the checks.
>
> This behaviour was introduced by
> f3209bea110cade12e2b133da8b8499689cb0e2e
> ("mac80211: fix IBSS teardown race")
>
> Cc: Ignacy Gawedzki <i@lri.fr>
> Cc: Johannes Berg <johannes@sipsolutions.net>
> Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de>
> ---
> net/mac80211/ibss.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/net/mac80211/ibss.c b/net/mac80211/ibss.c
> index c7386b2..67774b0 100644
> --- a/net/mac80211/ibss.c
> +++ b/net/mac80211/ibss.c
> @@ -1156,10 +1156,6 @@ int ieee80211_ibss_leave(struct ieee80211_sub_if_data *sdata)
>
> mutex_lock(&sdata->u.ibss.mtx);
>
> - sdata->u.ibss.state = IEEE80211_IBSS_MLME_SEARCH;
> - memset(sdata->u.ibss.bssid, 0, ETH_ALEN);
> - sdata->u.ibss.ssid_len = 0;
> -
> active_ibss = ieee80211_sta_active_ibss(sdata);
>
> if (!active_ibss && !is_zero_ether_addr(ifibss->bssid)) {
> @@ -1180,6 +1176,10 @@ int ieee80211_ibss_leave(struct ieee80211_sub_if_data *sdata)
> }
> }
>
> + ifibss->state = IEEE80211_IBSS_MLME_SEARCH;
> + memset(ifibss->bssid, 0, ETH_ALEN);
> + ifibss->ssid_len = 0;
> +
> sta_info_flush(sdata->local, sdata);
>
> spin_lock_bh(&ifibss->incomplete_lock);
> --
> 1.7.10
>
>
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
next prev parent reply other threads:[~2012-11-13 17:55 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-13 17:43 [PATCHv3] mac80211: deinitialize ibss-internals after emptiness check Simon Wunderlich
2012-11-13 17:55 ` Simon Wunderlich [this message]
2012-11-13 20:35 ` 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=20121113175547.GA19223@pandem0nium \
--to=simon.wunderlich@s2003.tu-chemnitz.de \
--cc=i@lri.fr \
--cc=johannes@sipsolutions.net \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
--cc=siwu@hrz.tu-chemnitz.de \
/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