From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from bu3sch.de ([62.75.166.246]:48056 "EHLO vs166246.vserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754336AbYFWJVI (ORCPT ); Mon, 23 Jun 2008 05:21:08 -0400 From: Michael Buesch To: "Ivo Van Doorn" Subject: Re: mac80211: workqueue & RTNL lock Date: Mon, 23 Jun 2008 11:20:41 +0200 Cc: linux-wireless , "Johannes Berg" References: <200806230042.41219.IvDoorn@gmail.com> <200806230030.42776.mb@bu3sch.de> In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Message-Id: <200806231120.41519.mb@bu3sch.de> (sfid-20080623_112112_379070_8F41F9E3) Sender: linux-wireless-owner@vger.kernel.org List-ID: On Monday 23 June 2008 10:30:47 Ivo Van Doorn wrote: > On 6/23/08, Michael Buesch wrote: > > On Monday 23 June 2008 00:42:41 Ivo van Doorn wrote: > >> That function calls flush_workqueue() > > > > Uh wait. It shouldn't call that. Where exactly is this function called? > > It is called right before local->ops->remove_interface() which means the > workqueue is flushed when it isn't even guaranteed that all interfaces are gone. > > net/mac80211/main.c:553 > > static int ieee80211_stop(struct net_device *dev) > { > > switch (sdata->vif.type) { > case IEEE80211_IF_TYPE_MESH_POINT: > case IEEE80211_IF_TYPE_STA: > case IEEE80211_IF_TYPE_IBSS: > > flush_workqueue(local->hw.workqueue); > > } > > } Oh right. I see. This is actually OK. I thought it would flush the global wq. The local mac80211 wq was introduced to workaround this rtnl deadlock, so I'm surprised it happens again. -- Greetings Michael.