OK
> -----Original Message----- > From: ovs-dev-boun...@openvswitch.org > [mailto:ovs-dev-boun...@openvswitch.org] On Behalf Of Ben Pfaff > Sent: Tuesday, 13 June, 2017 00:29 > To: d...@openvswitch.org > Cc: Ben Pfaff <b...@ovn.org> > Subject: [ovs-dev] [PATCH 18/31] fixup: Fix locking in netdev-native-tnl. > > Locks weren't always released on error paths. > > Signed-off-by: Ben Pfaff <b...@ovn.org> > --- > lib/netdev-native-tnl.c | 11 +++++++---- > 1 file changed, 7 insertions(+), 4 deletions(-) > > diff --git a/lib/netdev-native-tnl.c b/lib/netdev-native-tnl.c > index 658c871015f9..515b9948cabb 100644 > --- a/lib/netdev-native-tnl.c > +++ b/lib/netdev-native-tnl.c > @@ -468,6 +468,7 @@ netdev_gre_build_header(const struct netdev *netdev, > } else if (pt_ns(params->flow->packet_type) == OFPHTN_ETHERTYPE) { > greh->protocol = pt_ns_type_be(params->flow->packet_type); > } else { > + ovs_mutex_unlock(&dev->mutex); > return 1; > } > greh->flags = 0; > @@ -591,12 +592,10 @@ netdev_vxlan_build_header(const struct netdev *netdev, > vxh->vx_gpe.next_protocol = VXLAN_GPE_NP_ETHERNET; > break; > default: > - /* Drop packet. */ > - return 1; > - break; > + goto drop; > } > } else { > - return 1; > + goto drop; > } > } else { > put_16aligned_be32(&vxh->vx_flags, htonl(VXLAN_FLAGS)); > @@ -608,6 +607,10 @@ netdev_vxlan_build_header(const struct netdev *netdev, > data->header_len += sizeof *vxh; > data->tnl_type = OVS_VPORT_TYPE_VXLAN; > return 0; > + > +drop: > + ovs_mutex_unlock(&dev->mutex); > + return 1; > } > > struct dp_packet * > -- > 2.10.2 > > _______________________________________________ > dev mailing list > d...@openvswitch.org > https://mail.openvswitch.org/mailman/listinfo/ovs-dev _______________________________________________ dev mailing list d...@openvswitch.org https://mail.openvswitch.org/mailman/listinfo/ovs-dev