All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Herbert Xu <herbert@gondor.apana.org.au>
Cc: "David S. Miller" <davem@davemloft.net>, netdev@vger.kernel.org
Subject: Re: linkwatch bustage in git-net
Date: Tue, 8 May 2007 23:11:43 -0700	[thread overview]
Message-ID: <20070508231143.fcae61c7.akpm@linux-foundation.org> (raw)
In-Reply-To: <20070509054558.GA1184@gondor.apana.org.au>

On Wed, 9 May 2007 15:45:58 +1000 Herbert Xu <herbert@gondor.apana.org.au> wrote:

> On Wed, May 09, 2007 at 03:31:55PM +1000, Herbert Xu wrote:
> > 
> > Hmm, I don't see it here (probably because we use different NICs).
> > But does this help?
> 
> Thinking about it again I don't think it will help you because if your
> carrier started out as off then it would've been considered an urgent
> event anyway.
> 
> So what NIC are you using? And where abouts in the boot process is it
> hanging? For exmaple, is it hanging when obtaining a DHCP address?
> 
> In any case, this patch can't hurt.  So here's one with a changelog:
> 
> [NET] link_watch: Eliminate potential delay on wrap-around

hm, that fixed it.  Do we know why? ;)



btw, looking at the code:

	clear_bit(LW_RUNNING, &linkwatch_flags);

	spin_lock_irq(&lweventlist_lock);
	next = lweventlist;
	lweventlist = NULL;
	spin_unlock_irq(&lweventlist_lock);

	while (next) {
		struct net_device *dev = next;

		next = dev->link_watch_next;

lweventlist_lock protects lweventlist and every netdev's ->link_watch_next.
 But this code is walking that singly-linked list outside the lock and
after clearing LW_RUNNING.  What stops this singly-linked list from getting
altered by another thread of control while this code is traversing it?


  parent reply	other threads:[~2007-05-09  6:12 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-09  5:20 linkwatch bustage in git-net Andrew Morton
2007-05-09  5:31 ` Herbert Xu
2007-05-09  5:45   ` Herbert Xu
     [not found]     ` <20070508225153.d538f79c.akpm@linux-foundation.org>
2007-05-09  5:54       ` Herbert Xu
2007-05-09  5:58         ` Andrew Morton
2007-05-09  6:11     ` Andrew Morton [this message]
2007-05-09  6:22       ` David Miller
2007-05-09  7:16       ` Herbert Xu
2007-05-09  7:18         ` David Miller
2007-05-09 21:11           ` Andrew Morton
2007-05-09 21:39             ` David Miller
2007-05-09 21:45               ` Andrew Morton

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=20070508231143.fcae61c7.akpm@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=davem@davemloft.net \
    --cc=herbert@gondor.apana.org.au \
    --cc=netdev@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.