Search Linux Wireless

Re: [RFC] mac80211: fix locking with ieee80211_resume_disconnect()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Aug 21, 2013 at 11:35 PM, Johannes Berg
<johannes@xxxxxxxxxxxxxxxx> wrote:
> From: Johannes Berg <johannes.berg@xxxxxxxxx>
>
> If it is needed to disconnect multiple virtual interfaces after
> (WoWLAN-) suspend, the most obvious approach would be to iterate
> all interfaces by calling ieee80211_iterate_active_interfaces()
> and then call ieee80211_resume_disconnect() for each one. This
> is what the iwlmvm driver does.
>
> Unfortunately, this causes a locking dependency from mac80211's
> iflist_mtx to the key_mtx. This is problematic as the former is
> intentionally never held while calling any driver operation to
> allow drivers to iterate with their own locks held. The key_mtx
> is held while installing a key into the driver though, so this
> new lock dependency means drivers implementing the logic above
> can no longer hold their own lock while iterating.
>
> To fix this, modify the ieee80211_resume_disconnect() API to do
> the iteration in there (using RCU) while holding the key_mtx so
> there's no new lock dependency, and let the driver device which
> interface should be disconnected by passing a decision function
> that returns true/false.
>
can't you simply add a new rtnl-locked interface iterator?

Eliad.
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux