From: Johannes Berg <johannes@sipsolutions.net>
To: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Cc: linux-wireless@vger.kernel.org
Subject: Re: [PATCH 08/10] mac80211: shut down interfaces before destroying interface list
Date: Fri, 17 Jul 2015 11:16:50 +0200 [thread overview]
Message-ID: <1437124610.1933.8.camel@sipsolutions.net> (raw)
In-Reply-To: <1436359312-26533-9-git-send-email-emmanuel.grumbach@intel.com> (sfid-20150708_144234_957308_D5968C26)
On Wed, 2015-07-08 at 15:41 +0300, Emmanuel Grumbach wrote:
> From: Johannes Berg <johannes.berg@intel.com>
>
> If the hardware is unregistered while interfaces are up, mac80211
> will
> unregister all interfaces, which in turns causes mac80211 to be
> called
> again to remove them all from the driver and eventually shut down the
> hardware.
>
> During this shutdown, however, it's currently already unsafe to
> iterate
> the list of interfaces atomically, as the list is manipulated in an
> unsafe manner. This puts an undue burden on the driver - it must stop
> all its activities before calling ieee80211_unregister_hw(), while in
> the normal stop path it can do all cleanup in the stop method. If,
> for
> example, it's using the iteration during RX for some reason, it would
> have to stop RX before unregistering to avoid crashes.
>
> Fix this problem by closing all interfaces before unregistering them.
> This will cause the driver stop to have completed before we
> manipulate
> the interface list, and after the driver is stopped *and* has called
> ieee80211_unregister_hw() it really musn't be iterating any more as
> the memory will be freed as well.
>
Applied.
johannes
next prev parent reply other threads:[~2015-07-17 9:16 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-08 12:41 [PATCH 00/10] random patches to mac80211 Emmanuel Grumbach
2015-07-08 12:41 ` [PATCH 01/10] mac80211: Add support for declaring MU-MIMO capability Emmanuel Grumbach
2015-07-08 12:41 ` [PATCH 02/10] cfg80211: use RTNL locked reg_can_beacon for IR-relaxation Emmanuel Grumbach
2015-07-17 13:18 ` Johannes Berg
2015-07-08 12:41 ` [PATCH 03/10] mac80211: TDLS: handle chan-switch in RTNL locked work Emmanuel Grumbach
2015-07-08 12:41 ` [PATCH 04/10] mac80211: TDLS: deny ch-switch req on disallowed channels Emmanuel Grumbach
2015-07-08 12:41 ` [PATCH 05/10] mac80211: clear local->suspended before calling drv_resume() Emmanuel Grumbach
2015-07-17 13:45 ` Johannes Berg
2015-07-08 12:41 ` [PATCH 06/10] mac80211: remove ieee80211_aes_cmac_calculate_k1_k2() Emmanuel Grumbach
2015-07-17 13:43 ` Johannes Berg
2015-08-13 9:32 ` Johannes Berg
2015-07-08 12:41 ` [PATCH 07/10] mac80211: add possibility to advertise 802.11 FTM support Emmanuel Grumbach
2015-07-17 13:44 ` Johannes Berg
2015-07-08 12:41 ` [PATCH 08/10] mac80211: shut down interfaces before destroying interface list Emmanuel Grumbach
2015-07-17 9:16 ` Johannes Berg [this message]
2015-07-08 12:41 ` [PATCH 09/10] mac80211: allow drivers to set netdev hw_features Emmanuel Grumbach
2015-07-08 12:41 ` [PATCH 10/10] mac80211: enable changing netdev features with ethtool Emmanuel Grumbach
2015-07-17 13:46 ` 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=1437124610.1933.8.camel@sipsolutions.net \
--to=johannes@sipsolutions.net \
--cc=emmanuel.grumbach@intel.com \
--cc=linux-wireless@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).