[ovs-git] [openvswitch/ovs] 3f891b: netdev-dpdk: Fix deadlock in destroy_device().
noreply at github.com
Tue Aug 9 18:30:36 UTC 2016
Author: Daniele Di Proietto <diproiettod at vmware.com>
Date: 2016-08-09 (Tue, 09 Aug 2016)
netdev-dpdk: Fix deadlock in destroy_device().
netdev_dpdk_vhost_destruct() calls rte_vhost_driver_unregister(), which
can trigger the destroy_device() callback. destroy_device() will try to
take two mutexes already held by netdev_dpdk_vhost_destruct(), causing a
This problem can be solved by dropping the mutexes before calling
rte_vhost_driver_unregister(). The netdev_dpdk_vhost_destruct() and
construct() call are already serialized by netdev_mutex.
This commit also makes clear that dev->vhost_id is constant and can be
accessed without taking any mutexes in the lifetime of the devices.
Fixes: 8d38823bdf8b("netdev-dpdk: fix memory leak")
Reported-by: Ilya Maximets <i.maximets at samsung.com>
Signed-off-by: Daniele Di Proietto <diproiettod at vmware.com>
Acked-by: Ilya Maximets <i.maximets at samsung.com>
Acked-by: Mark Kavanagh <mark.b.kavanagh at intel.com>
More information about the git