[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <201004221253.11290.arnd@arndb.de>
Date: Thu, 22 Apr 2010 12:53:11 +0200
From: Arnd Bergmann <arnd@...db.de>
To: David Miller <davem@...emloft.net>
Cc: scofeldm@...co.com, netdev@...r.kernel.org, chrisw@...hat.com
Subject: Re: [net-next PATCH 1/2] add iovnl netlink support
On Thursday 22 April 2010, David Miller wrote:
> From: Scott Feldman <scofeldm@...co.com>
> 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
--
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