Search Linux Wireless

Re: [PATCH] mac80211: Add RTNL warning for workqueue

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

 



On Tue, 2008-06-24 at 19:23 +0200, Ivo van Doorn wrote:
> The workqueue provided by mac80211 should not be used for
> scheduled tasks that acquire the RTNL lock. This could be done
> when the driver uses the function ieee80211_iterate_active_interfaces()
> within the scheduled work. Such behavior will end in locking
> dependencies problems when an interface is being removed.
> 
> This patch will add a notification about the RTNL locking and
> the mac80211 workqueue to prevent driver developers from
> blindly using it.
> 
> Signed-off-by: Ivo van Doorn <IvDoorn@xxxxxxxxx>
> Cc: Johannes Berg <johannes@xxxxxxxxxxxxxxxx>
> ---
> diff --git a/include/net/mac80211.h b/include/net/mac80211.h
> index 19f1e41..02c79e6 100644
> --- a/include/net/mac80211.h
> +++ b/include/net/mac80211.h
> @@ -738,8 +738,11 @@ enum ieee80211_hw_flags {
>   * @conf: &struct ieee80211_conf, device configuration, don't use.
>   *
>   * @workqueue: single threaded workqueue available for driver use,
> - *	allocated by mac80211 on registration and flushed on
> - *	unregistration.
> + *	allocated by mac80211 on registration and flushed when an
> + *	interface is removed.

Interesting point. Should it be there or rather be moved down a bit so
that it is actually only flushed when _all_ interfaces are stopped, i.e.
before ->stop is invoked?

johannes

Attachment: signature.asc
Description: This is a digitally signed message part


[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux