[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20100421.235236.69366636.davem@davemloft.net>
Date: Wed, 21 Apr 2010 23:52:36 -0700 (PDT)
From: David Miller <davem@...emloft.net>
To: scofeldm@...co.com
Cc: netdev@...r.kernel.org, chrisw@...hat.com
Subject: Re: [net-next PATCH 1/2] add iovnl netlink support
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 :-)
As things stand it looks like if we can't find vf_dev, we'll just send
NULL down to the vf_dev arg of the various operations and possibly
silently succeed.
That's not desirable, semantically.
--
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