From: Shahaf Shuler Date: Thu, 9 Nov 2017 13:10:14 +0000 (+0200) Subject: net/mlx5: fix rxq interrupt memory corruption X-Git-Tag: spdx-start~867 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=b2e0e28e30767386a31bfb03aed724aa8b0a7198;p=dpdk.git 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 Acked-by: Adrien Mazarguil --- diff --git a/drivers/net/mlx5/mlx5_rxq.c b/drivers/net/mlx5/mlx5_rxq.c index 6b29aaee6e..85399eff54 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");