From mboxrd@z Thu Jan 1 00:00:00 1970 From: Herbert Xu Subject: Re: [NET]: Fix possible dev_deactivate race condition Date: Fri, 19 Oct 2007 17:29:21 +0800 Message-ID: <20071019092921.GA12380@gondor.apana.org.au> References: <1192745137.7367.40.camel@pasglop> <1192749449.7367.51.camel@pasglop> <20071019023219.GB8453@gondor.apana.org.au> <20071019042025.GA9617@gondor.apana.org.au> <20071019053624.GA10560@gondor.apana.org.au> <1192779319.27435.163.camel@twins> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: Linux Kernel Mailing List , "David S. Miller" , linuxppc-dev@ozlabs.org, Thomas Gleixner , netdev@vger.kernel.org, akpm@linux-foundation.org, Linus Torvalds , Ingo Molnar To: Peter Zijlstra Return-path: Content-Disposition: inline In-Reply-To: <1192779319.27435.163.camel@twins> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linuxppc-dev-bounces+glppd-linuxppc64-dev=m.gmane.org@ozlabs.org Errors-To: linuxppc-dev-bounces+glppd-linuxppc64-dev=m.gmane.org@ozlabs.org List-Id: netdev.vger.kernel.org On Fri, Oct 19, 2007 at 09:35:19AM +0200, Peter Zijlstra wrote: > > > /* Wait for outstanding qdisc_run calls. */ > > - while (test_bit(__LINK_STATE_QDISC_RUNNING, &dev->state)) > > - yield(); > > + do { > > + while (test_bit(__LINK_STATE_QDISC_RUNNING, &dev->state)) > > + yield(); > > + > > Ouch!, is there really no sane locking alternative? Hashed waitqueues > like for the page lock come to mind. Well if we ever moved the transmission to full process context then we'll gladly accept your patch :) Cheers, -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmV>HI~} Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt