All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] net/mlx5: fix rxq interrupt memory corruption
@ 2017-11-09 13:10 Shahaf Shuler
  2017-11-09 13:26 ` Adrien Mazarguil
  0 siblings, 1 reply; 3+ messages in thread
From: Shahaf Shuler @ 2017-11-09 13:10 UTC (permalink / raw)
  To: adrien.mazarguil, nelio.laranjeiro, yskoh; +Cc: dev, stable

intr_vec allocation size was wrong causing a memory corruption.

Fixes: e1016cb73383 ("net/mlx5: fix Rx interrupts management")
Cc: adrien.mazarguil@6wind.com
Cc: stable@dpdk.org

Signed-off-by: Shahaf Shuler <shahafs@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

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] net/mlx5: fix rxq interrupt memory corruption
  2017-11-09 13:10 [PATCH] net/mlx5: fix rxq interrupt memory corruption Shahaf Shuler
@ 2017-11-09 13:26 ` Adrien Mazarguil
  2017-11-10  9:01   ` [dpdk-stable] " Ferruh Yigit
  0 siblings, 1 reply; 3+ messages in thread
From: Adrien Mazarguil @ 2017-11-09 13:26 UTC (permalink / raw)
  To: Shahaf Shuler; +Cc: nelio.laranjeiro, yskoh, dev, stable

On Thu, Nov 09, 2017 at 03:10:14PM +0200, Shahaf Shuler wrote:
> intr_vec allocation size was wrong causing a memory corruption.
> 
> Fixes: e1016cb73383 ("net/mlx5: fix Rx interrupts management")
> Cc: adrien.mazarguil@6wind.com
> Cc: stable@dpdk.org
> 
> Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>

Indeed, nice catch.

Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>

Could you submit the same patch for mlx4 against the following commit?
(code is identical)

 0a2ae703192c ("net/mlx4: fix Rx interrupts management")

Thanks!

-- 
Adrien Mazarguil
6WIND

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [dpdk-stable] [PATCH] net/mlx5: fix rxq interrupt memory corruption
  2017-11-09 13:26 ` Adrien Mazarguil
@ 2017-11-10  9:01   ` Ferruh Yigit
  0 siblings, 0 replies; 3+ messages in thread
From: Ferruh Yigit @ 2017-11-10  9:01 UTC (permalink / raw)
  To: Adrien Mazarguil, Shahaf Shuler; +Cc: nelio.laranjeiro, yskoh, dev, stable

On 11/9/2017 5:26 AM, Adrien Mazarguil wrote:
> On Thu, Nov 09, 2017 at 03:10:14PM +0200, Shahaf Shuler wrote:
>> intr_vec allocation size was wrong causing a memory corruption.
>>
>> Fixes: e1016cb73383 ("net/mlx5: fix Rx interrupts management")
>> Cc: adrien.mazarguil@6wind.com
>> Cc: stable@dpdk.org
>>
>> Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
> 
> Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>

Applied to dpdk/master, thanks.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-11-10  9:01 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-09 13:10 [PATCH] net/mlx5: fix rxq interrupt memory corruption Shahaf Shuler
2017-11-09 13:26 ` Adrien Mazarguil
2017-11-10  9:01   ` [dpdk-stable] " Ferruh Yigit

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.