summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShahaf Shuler <shahafs@mellanox.com>2017-11-09 15:50:49 +0200
committerFerruh Yigit <ferruh.yigit@intel.com>2017-11-10 09:04:20 +0000
commit8ec50cd6240a50498989c08661819960d8e75243 (patch)
tree695945144c8006237b5fb9fd0699924816567794
parentb2e0e28e30767386a31bfb03aed724aa8b0a7198 (diff)
downloaddpdk-8ec50cd6240a50498989c08661819960d8e75243.zip
dpdk-8ec50cd6240a50498989c08661819960d8e75243.tar.gz
dpdk-8ec50cd6240a50498989c08661819960d8e75243.tar.xz
net/mlx4: fix rxq interrupt memory corruption
intr_vec allocation size was wrong causing a memory corruption. Fixes: 0a2ae703192c ("net/mlx4: 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/mlx4/mlx4_intr.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/mlx4/mlx4_intr.c b/drivers/net/mlx4/mlx4_intr.c
index b17d109..50d1976 100644
--- a/drivers/net/mlx4/mlx4_intr.c
+++ b/drivers/net/mlx4/mlx4_intr.c
@@ -98,7 +98,7 @@ mlx4_rx_intr_vec_enable(struct priv *priv)
struct rte_intr_handle *intr_handle = &priv->intr_handle;
mlx4_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) {
rte_errno = ENOMEM;
ERROR("failed to allocate memory for interrupt vector,"