summaryrefslogtreecommitdiff
path: root/drivers/net/mlx5/mlx5_ethdev.c
diff options
context:
space:
mode:
authorAdrien Mazarguil <adrien.mazarguil@6wind.com>2018-05-24 16:36:49 +0200
committerShahaf Shuler <shahafs@mellanox.com>2018-05-28 07:50:38 +0200
commite89c15b6971e5040296dc69f8739dd629f56a4b2 (patch)
treee33faab0b66b959fb6af5b3e7d32df55b0bc910e /drivers/net/mlx5/mlx5_ethdev.c
parentf8ad40dc998cfaa5b08d97d813570ec6373dabcc (diff)
downloaddpdk-e89c15b6971e5040296dc69f8739dd629f56a4b2.zip
dpdk-e89c15b6971e5040296dc69f8739dd629f56a4b2.tar.gz
dpdk-e89c15b6971e5040296dc69f8739dd629f56a4b2.tar.xz
net/mlx5: fix crash when configure is not called
Although uncommon, applications may destroy a device immediately after probing it without going through dev_configure() first. This patch addresses a crash which occurs when mlx5_dev_close() calls mlx5_mr_release() due to an uninitialized entry in the private structure. Fixes: 974f1e7ef146 ("net/mlx5: add new memory region support") Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com> Acked-by: Yongseok Koh <yskoh@mellanox.com>
Diffstat (limited to 'drivers/net/mlx5/mlx5_ethdev.c')
-rw-r--r--drivers/net/mlx5/mlx5_ethdev.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/drivers/net/mlx5/mlx5_ethdev.c b/drivers/net/mlx5/mlx5_ethdev.c
index c52ec6f..f6cebae 100644
--- a/drivers/net/mlx5/mlx5_ethdev.c
+++ b/drivers/net/mlx5/mlx5_ethdev.c
@@ -403,10 +403,6 @@ mlx5_dev_configure(struct rte_eth_dev *dev)
/* rte_errno is already set. */
return -rte_errno;
}
- rte_rwlock_write_lock(&mlx5_shared_data->mem_event_rwlock);
- LIST_INSERT_HEAD(&mlx5_shared_data->mem_event_cb_list,
- priv, mem_event_cb);
- rte_rwlock_write_unlock(&mlx5_shared_data->mem_event_rwlock);
return 0;
}