lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20070508231143.fcae61c7.akpm@linux-foundation.org>
Date:	Tue, 8 May 2007 23:11:43 -0700
From:	Andrew Morton <akpm@...ux-foundation.org>
To:	Herbert Xu <herbert@...dor.apana.org.au>
Cc:	"David S. Miller" <davem@...emloft.net>, netdev@...r.kernel.org
Subject: Re: linkwatch bustage in git-net

On Wed, 9 May 2007 15:45:58 +1000 Herbert Xu <herbert@...dor.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?

-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ