Re: missing retval check of call_netdevice_notifiers in dev_change_net_namespace

2020-06-23 Thread Herbert Xu
On Mon, Jun 22, 2020 at 12:43:53PM -0500, Eric W. Biederman wrote: > > Adding Herbert Xu who added support for failing notifications in > fcc5a03ac425 ("[NET]: Allow netdev REGISTER/CHANGENAME events to fail"). > > He might have some insight but 2007 was a long time ago. https://lists.openwall.n

Re: missing retval check of call_netdevice_notifiers in dev_change_net_namespace

2020-06-22 Thread Eric W. Biederman
"Jason A. Donenfeld" writes: > Hi, Adding Herbert Xu who added support for failing notifications in fcc5a03ac425 ("[NET]: Allow netdev REGISTER/CHANGENAME events to fail"). He might have some insight but 2007 was a long time ago. All I remember is the ability of NETDEV_CHANGENAME to fail was a

Re: missing retval check of call_netdevice_notifiers in dev_change_net_namespace

2020-06-22 Thread Petr Machata
Jason A. Donenfeld writes: > int dev_change_net_namespace(struct net_device *dev, struct net *net, > const char *pat) > { >struct net *net_old = dev_net(dev); >int err, new_nsid, new_ifindex; > >ASSERT_RTNL(); > [...] > /* Add the device back in the hashes */ >

Re: missing retval check of call_netdevice_notifiers in dev_change_net_namespace

2020-06-21 Thread David Ahern
+Ido On 6/21/20 1:58 AM, Jason A. Donenfeld wrote: > > Finally, it could be the solution is that modules that use the netdev > notifier never really rely too heavily upon getting notifications, and > if they need something reliable, then they rearchitect their code to > not need that. I could ima

missing retval check of call_netdevice_notifiers in dev_change_net_namespace

2020-06-21 Thread Jason A. Donenfeld
Hi, In register_netdevice, there's a call to call_netdevice_notifiers(NETDEV_REGISTER), whose return value is checked to determine whether or not to roll back the device registration. The reason checking that return value is important is because this represents an opportunity for the various notif