Netdev List
 help / color / mirror / Atom feed
From: Herbert Xu <herbert@gondor.apana.org.au>
To: Peter Zijlstra <peterz@infradead.org>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	"David S. Miller" <davem@davemloft.net>,
	linuxppc-dev@ozlabs.org, Thomas Gleixner <tglx@linutronix.de>,
	netdev@vger.kernel.org, akpm@linux-foundation.org,
	Linus Torvalds <torvalds@linux-foundation.org>,
	Ingo Molnar <mingo@elte.hu>
Subject: Re: [NET]: Fix possible dev_deactivate race condition
Date: Fri, 19 Oct 2007 17:29:21 +0800	[thread overview]
Message-ID: <20071019092921.GA12380@gondor.apana.org.au> (raw)
In-Reply-To: <1192779319.27435.163.camel@twins>

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~} <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

      reply	other threads:[~2007-10-19  9:29 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <E1IiWnJ-0000ne-00@gondolin.me.apana.org.au>
     [not found] ` <1192745137.7367.40.camel@pasglop>
     [not found]   ` <alpine.LFD.0.999.0710181549330.26902@woody.linux-foundation.org>
     [not found]     ` <1192749449.7367.51.camel@pasglop>
     [not found]       ` <alpine.LFD.0.999.0710181627091.26902@woody.linux-foundation.org>
     [not found]         ` <20071019023219.GB8453@gondor.apana.org.au>
     [not found]           ` <alpine.LFD.0.999.0710181941020.26902@woody.linux-foundation.org>
     [not found]             ` <alpine.LFD.0.999.0710182007170.26902@woody.linux-foundation.org>
     [not found]               ` <20071019042025.GA9617@gondor.apana.org.au>
2007-10-19  5:36                 ` [NET]: Fix possible dev_deactivate race condition Herbert Xu
2007-10-19  5:38                   ` David Miller
2007-10-19  7:35                   ` Peter Zijlstra
2007-10-19  9:29                     ` Herbert Xu [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20071019092921.GA12380@gondor.apana.org.au \
    --to=herbert@gondor.apana.org.au \
    --cc=akpm@linux-foundation.org \
    --cc=davem@davemloft.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=mingo@elte.hu \
    --cc=netdev@vger.kernel.org \
    --cc=peterz@infradead.org \
    --cc=tglx@linutronix.de \
    --cc=torvalds@linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox