Skip to content

Commit febf4a7

Browse files
committed
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>
1 parent 7c26997 commit febf4a7

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

lib/dpif-netdev.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3369,8 +3369,10 @@ dp_netdev_del_pmd(struct dp_netdev *dp, struct dp_netdev_pmd_thread *pmd)
33693369
/* NON_PMD_CORE_ID doesn't have a thread, so we don't have to synchronize,
33703370
* but extra cleanup is necessary */
33713371
if (pmd->core_id == NON_PMD_CORE_ID) {
3372+
ovs_mutex_lock(&dp->non_pmd_mutex);
33723373
emc_cache_uninit(&pmd->flow_cache);
33733374
pmd_free_cached_ports(pmd);
3375+
ovs_mutex_unlock(&dp->non_pmd_mutex);
33743376
} else {
33753377
latch_set(&pmd->exit_latch);
33763378
dp_netdev_reload_pmd__(pmd);

0 commit comments

Comments
 (0)