On Wed, Dec 26, 2012 at 05:16:42PM -0800, Ethan Jackson wrote: > Theoretically, it's possible for netdev_get_status() to be called > on a netdev-vport which hasn't had it's configuration set yet. In
s/it's/its/ > this case, netdev-vport would dereference a null pointer. This > problem was found by Jesse Gross <je...@nicira.com> in review. I usually would write this as: Reported-by: Jesse Gross <je...@nicira.com> > Signed-off-by: Ethan Jackson <et...@nicira.com> > --- > lib/netdev-vport.c | 6 ++++++ > 1 file changed, 6 insertions(+) > > diff --git a/lib/netdev-vport.c b/lib/netdev-vport.c > index e50103b..9bb5d36 100644 > --- a/lib/netdev-vport.c > +++ b/lib/netdev-vport.c > @@ -460,6 +460,12 @@ netdev_vport_get_tnl_iface(const struct netdev *netdev) > static char name[IFNAMSIZ]; > > ndv = netdev_dev_vport_cast(netdev_get_dev(netdev)); > + if (!ndv->options) { > + /* Race condition when 'ndv' was created, but did not have it's s/it's/its/ > + * configuration set yet. */ > + return NULL; > + } > + _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev