summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorIlya Maximets <i.maximets@samsung.com>2016-12-06 09:45:07 +0300
committerBen Pfaff <blp@ovn.org>2016-12-06 09:38:35 -0800
commit569c26da9d0f93bc0e110ee267d4f3a770a0da0c (patch)
tree30fac7a35c213e1b3d8fa71793da092f4d627011 /lib
parentc8c300b88b945dd8393cc9553fa3b8f38fef9db3 (diff)
downloadopenvswitch-569c26da9d0f93bc0e110ee267d4f3a770a0da0c.tar.gz
netdev-dpdk: Don't use dev->vhost_id without mutex.
The copy should be used here. Additionally, 'strlen' changed to the faster check. Fixes: 821b86649a90 ("netdev-dpdk: Don't try to unregister empty vhost_id.") Signed-off-by: Ilya Maximets <i.maximets@samsung.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
Diffstat (limited to 'lib')
-rw-r--r--lib/netdev-dpdk.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/netdev-dpdk.c b/lib/netdev-dpdk.c
index 6e5cd431a..61d7aa306 100644
--- a/lib/netdev-dpdk.c
+++ b/lib/netdev-dpdk.c
@@ -1027,7 +1027,7 @@ netdev_dpdk_vhost_destruct(struct netdev *netdev)
ovs_mutex_unlock(&dev->mutex);
ovs_mutex_unlock(&dpdk_mutex);
- if (!strlen(dev->vhost_id)) {
+ if (!vhost_id[0]) {
goto out;
}