[ovs-dev] [PATCH 2/3] vport: Make dp_port->vport always valid.

Jesse Gross jesse at nicira.com
Fri Jul 30 13:46:23 PDT 2010


On Fri, Jul 30, 2010 at 9:44 AM, Ben Pfaff <blp at nicira.com> wrote:

> On Thu, Jul 29, 2010 at 05:38:54PM -0700, Jesse Gross wrote:
> > When we detached a vport we would assign NULL to dp_port->vport
> > before calling synchronize_rcu().  However, since vports have a
> > longer lifetime than dp_ports there were no checks before
> > dereferencing dp_port->vport.  This changes the behavior to
> > match the assumption by not assigning NULL during detach.
>
> Looks good.  This fixes a bug, right?  It's good to make that clear in
> the commit message.
>

Yeah, it avoids a potential crash (though it hasn't actually happened to the
best of my knowledge).  I updated the commit message to make that clear.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://openvswitch.org/pipermail/dev/attachments/20100730/29a262b6/attachment.htm>


More information about the dev mailing list