[ovs-dev] [PATCH 2/2] ofproto-dpif: Initialize odp_port to OVSP_NONE in port_construct().

Ethan Jackson ethan at nicira.com
Mon Nov 26 20:27:16 UTC 2012


I'm worried about dpif_port_query_by_name() failing, returning an error,
and then some cleanup code referencing the odp_port.  I don't like the idea
of uninitialized data leaving the port_construct() function, even if it's
garbage that's intended to be destroyed.  That said, I don't feel that
strongly about it, I don't think this solves an actual problem, so I'm
happy to drop it if you think we should.

Ethan


On Sat, Nov 24, 2012 at 8:01 PM, Ben Pfaff <blp at nicira.com> wrote:

> On Sat, Nov 24, 2012 at 06:32:15PM -0800, Ethan Jackson wrote:
> > I don't think this fixes an actual problem, but it seems more
> > future proof.
> >
> > Signed-off-by: Ethan Jackson <ethan at nicira.com>
>
> It gets assigned its permanent value a few lines down, after the call to
> dpif_port_query_by_name().  I don't think it's likely that
> dpif_port_query_by_name() could reference it, since dpif is a different
> (lower) layer.
>
> Do you think it's worthwhile?
>
> Thanks,
>
> Ben.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openvswitch.org/pipermail/ovs-dev/attachments/20121126/fb8abd3c/attachment-0003.html>


More information about the dev mailing list