Message ID | 1462920642-63370-1-git-send-email-joe@ovn.org |
---|---|
State | Accepted |
Headers | show |
Thanks for fixing this! Acked-by: Daniele Di Proietto <diproiettod@vmware.com> 2016-05-10 15:50 GMT-07:00 Joe Stringer <joe@ovn.org>: > Clang complains: > lib/netdev-dpdk.c:1860:1: error: mutex 'dev->mutex' is not locked on every > path > through here [-Werror,-Wthread-safety-analysis] > } > ^ > lib/netdev-dpdk.c:1815:5: note: mutex acquired here > ovs_mutex_lock(&dev->mutex); > ^ > ./include/openvswitch/thread.h:60:9: note: expanded from macro > 'ovs_mutex_lock' > ovs_mutex_lock_at(mutex, OVS_SOURCE_LOCATOR) > ^ > > Fixes: d6e3feb57c44 ("Add support for extended netdev statistics based on > RFC 2819.") > Signed-off-by: Joe Stringer <joe@ovn.org> > --- > lib/netdev-dpdk.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/lib/netdev-dpdk.c b/lib/netdev-dpdk.c > index af86d194f9bb..87879d5c6e4d 100644 > --- a/lib/netdev-dpdk.c > +++ b/lib/netdev-dpdk.c > @@ -1819,6 +1819,7 @@ netdev_dpdk_get_stats(const struct netdev *netdev, > struct netdev_stats *stats) > > if (rte_eth_stats_get(dev->port_id, &rte_stats)) { > VLOG_ERR("Can't get ETH statistics for port: %i.", dev->port_id); > + ovs_mutex_unlock(&dev->mutex); > return EPROTO; > } > > -- > 2.1.4 > > _______________________________________________ > dev mailing list > dev@openvswitch.org > http://openvswitch.org/mailman/listinfo/dev >
On 12 May 2016 at 17:32, Daniele Di Proietto <diproiettod@ovn.org> wrote: > Thanks for fixing this! > > Acked-by: Daniele Di Proietto <diproiettod@vmware.com> Thanks, applied.
diff --git a/lib/netdev-dpdk.c b/lib/netdev-dpdk.c index af86d194f9bb..87879d5c6e4d 100644 --- a/lib/netdev-dpdk.c +++ b/lib/netdev-dpdk.c @@ -1819,6 +1819,7 @@ netdev_dpdk_get_stats(const struct netdev *netdev, struct netdev_stats *stats) if (rte_eth_stats_get(dev->port_id, &rte_stats)) { VLOG_ERR("Can't get ETH statistics for port: %i.", dev->port_id); + ovs_mutex_unlock(&dev->mutex); return EPROTO; }
Clang complains: lib/netdev-dpdk.c:1860:1: error: mutex 'dev->mutex' is not locked on every path through here [-Werror,-Wthread-safety-analysis] } ^ lib/netdev-dpdk.c:1815:5: note: mutex acquired here ovs_mutex_lock(&dev->mutex); ^ ./include/openvswitch/thread.h:60:9: note: expanded from macro 'ovs_mutex_lock' ovs_mutex_lock_at(mutex, OVS_SOURCE_LOCATOR) ^ Fixes: d6e3feb57c44 ("Add support for extended netdev statistics based on RFC 2819.") Signed-off-by: Joe Stringer <joe@ovn.org> --- lib/netdev-dpdk.c | 1 + 1 file changed, 1 insertion(+)