mirror of
https://github.com/openvswitch/ovs
synced 2025-09-01 06:45:17 +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:
@@ -1027,7 +1027,7 @@ netdev_dpdk_vhost_destruct(struct netdev *netdev)
|
|||||||
ovs_mutex_unlock(&dev->mutex);
|
ovs_mutex_unlock(&dev->mutex);
|
||||||
ovs_mutex_unlock(&dpdk_mutex);
|
ovs_mutex_unlock(&dpdk_mutex);
|
||||||
|
|
||||||
if (!strlen(dev->vhost_id)) {
|
if (!vhost_id[0]) {
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user