[dpdk-dev] [PATCH] net/mlx5: fix rxq interrupt memory corruption
Shahaf Shuler
shahafs at mellanox.com
Thu Nov 9 14:10:14 CET 2017
intr_vec allocation size was wrong causing a memory corruption.
Fixes: e1016cb73383 ("net/mlx5: fix Rx interrupts management")
Cc: adrien.mazarguil at 6wind.com
Cc: stable at dpdk.org
Signed-off-by: Shahaf Shuler <shahafs at mellanox.com>
---
drivers/net/mlx5/mlx5_rxq.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/mlx5/mlx5_rxq.c b/drivers/net/mlx5/mlx5_rxq.c
index 6b29aaee6..85399eff5 100644
--- a/drivers/net/mlx5/mlx5_rxq.c
+++ b/drivers/net/mlx5/mlx5_rxq.c
@@ -331,7 +331,7 @@ priv_rx_intr_vec_enable(struct priv *priv)
if (!priv->dev->data->dev_conf.intr_conf.rxq)
return 0;
priv_rx_intr_vec_disable(priv);
- intr_handle->intr_vec = malloc(sizeof(intr_handle->intr_vec[rxqs_n]));
+ intr_handle->intr_vec = malloc(n * sizeof(intr_handle->intr_vec[0]));
if (intr_handle->intr_vec == NULL) {
ERROR("failed to allocate memory for interrupt vector,"
" Rx interrupts will not be supported");
--
2.12.0
More information about the dev
mailing list