2
0
mirror of https://github.com/openvswitch/ovs synced 2025-08-30 22:05:19 +00:00

netdev-dpdk: Don't use dev->vhost_id without mutex.

The copy should be used here.
Additionally, 'strlen' changed to the faster check.

Fixes: 821b86649a ("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>
This commit is contained in:
Ilya Maximets
2016-12-06 09:45:07 +03:00
committed by Ben Pfaff
parent c8c300b88b
commit 569c26da9d

View File

@@ -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;
}