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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 25 Jun 2013 09:57:27 -0700
From:	Eric Dumazet <eric.dumazet@...il.com>
To:	Nicolas Schichan <nschichan@...ebox.fr>
Cc:	netdev@...r.kernel.org, "David S. Miller" <davem@...emloft.net>,
	Cong Wang <amwang@...hat.com>
Subject: Re: freeze with interface rename & SIOCGIFNAME

On Tue, 2013-06-25 at 18:27 +0200, Nicolas Schichan wrote:
> On 06/25/2013 06:15 PM, Eric Dumazet wrote:
> > Nice catch !
> >
> > Please add a helper so that we can use it as well from
> > sock_getbindtodevice(), and submit an official patch ?
> 
> Sure, I'll do that.
> 
> > int netdev_get_name(char *name, int ifindex)
> > {
> > 	struct net_device *dev;
> > 	unsigned int seq;
> >
> > retry:
> >          seq = read_seqcount_begin(&devnet_rename_seq);
> 
> raw_seqcount_begin is required here here. read_seqcount_begin will spin 
> forever as the s->sequence & 1 check will always be true in 
> __read_seqcount_begin(). This will incur some unneed work if a rename is in 
> progress, but that's better than locking the system up.

I am not sure it's needed, because the writer holds a spinlock and is
not allowed to sleep or being preempted.

If it's needed, there is a bug somewhere else...



--
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