Subject: Re: [net-next PATCH 1/2] add iovnl netlink support

From: Arnd Bergmann <[email-masked]>
Date: Thu, 22 Apr 2010 12:53:11 +0200

On Thursday 22 April 2010, David Miller wrote:
> From: Scott Feldman <[email-masked]>
> Date: Mon, 19 Apr 2010 12:18:07 -0700
> 
> > +     if (tb[IOV_ATTR_VF_IFNAME])
> > +             vf_dev = dev_get_by_name(&init_net,
> > +                     nla_data(tb[IOV_ATTR_VF_IFNAME]));
> 
> It's probably best to check this for NULL and notify
> the user with an error in that case (don't forget to
> put 'dev' in that error path :-)

Since you brought up that hunk: shouldn't the namespace better
be current->nsproxy->net_ns instead of init_ns? If the sender
is confined in a separate network namespace, I would expect
that it should be able to modify devices in its own namespace
but none that are in the root namespace.

	Arnd