From: Ivo van Doorn Date: Tue, 24 Jun 2008 17:23:36 +0000 (+0200) Subject: mac80211: Add RTNL warning for workqueue X-Git-Tag: v2.6.27-rc1~969^2~254^2~6 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=428da76523e4a9c08bdfadc25a05b520f19b9133;p=linux-2.6 mac80211: Add RTNL warning for workqueue 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 Acked-by: Johannes Berg Signed-off-by: John W. Linville --- diff --git a/include/net/mac80211.h b/include/net/mac80211.h index 19f1e412a0..02c79e6b30 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. + * NOTICE: All work performed on this workqueue should NEVER + * acquire the RTNL lock (i.e. Don't use the function + * ieee80211_iterate_active_interfaces()) * * @priv: pointer to private area that was allocated for driver use * along with this structure.