On Thu, Dec 27, 2012 at 2:36 PM, Ben Pfaff <b...@nicira.com> wrote:
> On Thu, Dec 27, 2012 at 12:37:27PM -0500, Jesse Gross wrote:
>> On Wed, Dec 26, 2012 at 8:16 PM, Ethan Jackson <et...@nicira.com> 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
>> > this case, netdev-vport would dereference a null pointer.  This
>> > problem was found by Jesse Gross <je...@nicira.com> in review.
>> >
>> > Signed-off-by: Ethan Jackson <et...@nicira.com>
>>
>> Shouldn't we just fetch the config?  It's pretty easy and seems a lot
>> less likely to cause surprises in the future.
>
> As long as we're talking about theoretical situations, it's possible
> that the vport doesn't exist in the kernel yet.  We let vports be
> created and configured in userspace before they get added to a
> datapath.  In between, they're just userspace configuration data.

That's true and in that case if we don't have a config then this patch
clearly does the right thing.  However, we also use the netdev library
to also pull the current config from the kernel.  If we used this for
something like ovs-dpctl (which we don't) then it would give the wrong
result.

I think making it fetch the config is the right thing to do, although
since the code is going away and it's not a current problem it may not
be worth it (although I think the necessary refactoring is minimal).
_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to