summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShahaf Shuler <shahafs@mellanox.com>2017-11-09 15:10:14 +0200
committerFerruh Yigit <ferruh.yigit@intel.com>2017-11-10 08:56:26 +0000
commitb2e0e28e30767386a31bfb03aed724aa8b0a7198 (patch)
tree63bed0c4d7a2065fed340a2470e3e3e3904a5ce8
parent4daae08e7f5894cfa4cc729b21c1ac9750c2084c (diff)
downloaddpdk-b2e0e28e30767386a31bfb03aed724aa8b0a7198.zip
dpdk-b2e0e28e30767386a31bfb03aed724aa8b0a7198.tar.gz
dpdk-b2e0e28e30767386a31bfb03aed724aa8b0a7198.tar.xz
net/mlx5: fix rxq interrupt memory corruption
intr_vec allocation size was wrong causing a memory corruption. Fixes: e1016cb73383 ("net/mlx5: fix Rx interrupts management") Cc: stable@dpdk.org Signed-off-by: Shahaf Shuler <shahafs@mellanox.com> Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
-rw-r--r--drivers/net/mlx5/mlx5_rxq.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/mlx5/mlx5_rxq.c b/drivers/net/mlx5/mlx5_rxq.c
index 6b29aae..85399ef 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");