diff options
author | Daniele Di Proietto <diproiettod@vmware.com> | 2016-11-15 15:40:49 -0800 |
---|---|---|
committer | Daniele Di Proietto <diproiettod@vmware.com> | 2017-01-15 19:25:11 -0800 |
commit | febf4a7a8748311e76e462d6843dd6ccb9b4c5de (patch) | |
tree | ec7fe4b5a3281c9ab909335d60640e78bd5ca95c /lib | |
parent | 7c269972577da6aa3022216d754e9a86bb9461b5 (diff) | |
download | openvswitch-febf4a7a8748311e76e462d6843dd6ccb9b4c5de.tar.gz |
dpif-netdev: Take non_pmd_mutex to access tx cached ports.
As documented in dp_netdev_pmd_thread, we must take non_pmd_mutex to
access the tx port caches for the non pmd thread.
Found by inspection.
Signed-off-by: Daniele Di Proietto <diproiettod@vmware.com>
Acked-by: Ilya Maximets <i.maximets@samsung.com>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/dpif-netdev.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/dpif-netdev.c b/lib/dpif-netdev.c index 32aa8d80e..736a159f7 100644 --- a/lib/dpif-netdev.c +++ b/lib/dpif-netdev.c @@ -3369,8 +3369,10 @@ dp_netdev_del_pmd(struct dp_netdev *dp, struct dp_netdev_pmd_thread *pmd) /* NON_PMD_CORE_ID doesn't have a thread, so we don't have to synchronize, * but extra cleanup is necessary */ if (pmd->core_id == NON_PMD_CORE_ID) { + ovs_mutex_lock(&dp->non_pmd_mutex); emc_cache_uninit(&pmd->flow_cache); pmd_free_cached_ports(pmd); + ovs_mutex_unlock(&dp->non_pmd_mutex); } else { latch_set(&pmd->exit_latch); dp_netdev_reload_pmd__(pmd); |