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: <4696305B.5070809@trash.net>
Date:	Thu, 12 Jul 2007 15:44:59 +0200
From:	Patrick McHardy <kaber@...sh.net>
To:	Pavel Emelianov <xemul@...nvz.org>
CC:	David Miller <davem@...emloft.net>,
	Linux Netdev List <netdev@...r.kernel.org>
Subject: Re: [PATCH 2/2] Virtual ethernet device driver

Pavel Emelianov wrote:
> Patrick McHardy wrote:
> 
>>No, to get unique names the sequence has to be:
>>
>>dev_alloc_name
>>register_netdevice
>>dev_alloc_name
>>register_netdevice
>>
>>But you have:
>>
>>dev_alloc_name
>>dev_alloc_name (<- might allocate same name as first call)
>>register_netdevice
>>register_netdevice
> 
> 
> Oops :) You're right. That's the problem. I was carried away by
> testing the "peer" options and checking for names rather than
> "veth%d" to work...
> 
> By the way, that will create some problems. You see, your patches
> imply that the register_netdevice() will be called at the very end
> of the ->newlink callback. Otherwise, the error path of any code
> following the registering will have to call unregister_netdevice()
> which will BUG() in free_netdev() in rtnl_newlink() - the device
> state will be neither UNINITIALIZED nor UNREGISTERED :(


Thats true. I think you could do:

- use name of the supplied device for the second device
- register second device
- allocate new name for first device
- register first device
-
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