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  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]
Date:	Mon, 18 Apr 2016 13:10:51 -0700
From:	Francesco Ruggeri <>
To:	"Eric W. Biederman" <>
Cc:	netdev <>,
	"David S. Miller" <>,
	Mahesh Bandewar <>
Subject: Re: [PATCH net-next] macvlan: fix failure during registration

On Mon, Apr 18, 2016 at 11:48 AM, Eric W. Biederman
<> wrote:
> These interactions all seem a little bit funny.  At a quick skim it
> would make more sense to increment the port count in macvlan_init,
> and completely remove the need to mess with port counts anywhere except
> macvlan_init and macvlan_uninit.

Thanks Eric, let me try that.

> If for some reason that can't be done the code can easily look at
> dev->reg_state.  If dev->reg_state == NETREG_UNITIALIZED it should
> be exactly the same as your new flag being set.

I am not sure that in macvlan_uninit one can tell whether it is being
invoked in the context of a failed register_netdevice (if that is what
you meant).

In case of register_netdevice failing in
call_netdevice_notifiers(NETDEV_REGISTER) the call sequence is:

    call_netdevice_notifiers(NETDEV_REGISTER, dev) (<== fail here)
          dev->reg_state = NETREG_UNREGISTERING
      dev->reg_state = NETREG_UNREGISTERED;


Powered by blists - more mailing lists