patches for DPDK stable branches
 help / color / mirror / Atom feed
* [dpdk-stable] [PATCH 1/2] net/mlx5: fix Rx queue creation error flow
@ 2020-12-15  8:48 Michael Baum
  2020-12-15  8:48 ` [dpdk-stable] [PATCH 2/2] net/mlx5: fix Tx " Michael Baum
  0 siblings, 1 reply; 3+ messages in thread
From: Michael Baum @ 2020-12-15  8:48 UTC (permalink / raw)
  To: dev; +Cc: Matan Azrad, Raslan Darawsheh, Viacheslav Ovsiienko, stable

In Rx queue creation, there are some validations for the Rx
configuration.

When one of them fails, the MR btree memory was not freed what caused a
memory leak.

Free it.

Fixes: 974f1e7ef146 ("net/mlx5: add new memory region support")
Cc: stable@dpdk.org

Signed-off-by: Michael Baum <michaelba@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
---
 drivers/net/mlx5/mlx5_rxq.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/mlx5/mlx5_rxq.c b/drivers/net/mlx5/mlx5_rxq.c
index da7a8b3..dbba5ca 100644
--- a/drivers/net/mlx5/mlx5_rxq.c
+++ b/drivers/net/mlx5/mlx5_rxq.c
@@ -1689,6 +1689,7 @@ struct mlx5_rxq_ctrl *
 	LIST_INSERT_HEAD(&priv->rxqsctrl, tmpl, next);
 	return tmpl;
 error:
+	mlx5_mr_btree_free(&tmpl->rxq.mr_ctrl.cache_bh);
 	mlx5_free(tmpl);
 	return NULL;
 }
-- 
1.8.3.1


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

* [dpdk-stable] [PATCH 2/2] net/mlx5: fix Tx queue creation error flow
  2020-12-15  8:48 [dpdk-stable] [PATCH 1/2] net/mlx5: fix Rx queue creation error flow Michael Baum
@ 2020-12-15  8:48 ` Michael Baum
  2021-01-06 21:47   ` Thomas Monjalon
  0 siblings, 1 reply; 3+ messages in thread
From: Michael Baum @ 2020-12-15  8:48 UTC (permalink / raw)
  To: dev; +Cc: Matan Azrad, Raslan Darawsheh, Viacheslav Ovsiienko, stable

In Tx queue creation, there are two validations for the Tx
configuration.

When one of them fails, the MR btree memory was not freed what caused a
memory leak.

Free it.

Fixes: f6d9ab4e769f ("net/mlx5: check Tx queue size overflow")
Cc: stable@dpdk.org

Signed-off-by: Michael Baum <michaelba@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
---
 drivers/net/mlx5/mlx5_txq.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/mlx5/mlx5_txq.c b/drivers/net/mlx5/mlx5_txq.c
index d96abef..b81bb4a 100644
--- a/drivers/net/mlx5/mlx5_txq.c
+++ b/drivers/net/mlx5/mlx5_txq.c
@@ -1146,6 +1146,7 @@ struct mlx5_txq_ctrl *
 	LIST_INSERT_HEAD(&priv->txqsctrl, tmpl, next);
 	return tmpl;
 error:
+	mlx5_mr_btree_free(&tmpl->txq.mr_ctrl.cache_bh);
 	mlx5_free(tmpl);
 	return NULL;
 }
-- 
1.8.3.1


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

* Re: [dpdk-stable] [PATCH 2/2] net/mlx5: fix Tx queue creation error flow
  2020-12-15  8:48 ` [dpdk-stable] [PATCH 2/2] net/mlx5: fix Tx " Michael Baum
@ 2021-01-06 21:47   ` Thomas Monjalon
  0 siblings, 0 replies; 3+ messages in thread
From: Thomas Monjalon @ 2021-01-06 21:47 UTC (permalink / raw)
  To: Michael Baum
  Cc: dev, stable, Matan Azrad, Raslan Darawsheh, Viacheslav Ovsiienko

15/12/2020 09:48, Michael Baum:
> In Tx queue creation, there are two validations for the Tx
> configuration.
> 
> When one of them fails, the MR btree memory was not freed what caused a
> memory leak.
> 
> Free it.
> 
> Fixes: f6d9ab4e769f ("net/mlx5: check Tx queue size overflow")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Michael Baum <michaelba@nvidia.com>
> Acked-by: Matan Azrad <matan@nvidia.com>

It is not really fixing the queue creation but a leak.
In such case, it is more explicit to say in title:
"fix leak on [...] failure"

Series applied in next-net-mlx with above wording, thanks.



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

end of thread, other threads:[~2021-01-06 21:47 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-15  8:48 [dpdk-stable] [PATCH 1/2] net/mlx5: fix Rx queue creation error flow Michael Baum
2020-12-15  8:48 ` [dpdk-stable] [PATCH 2/2] net/mlx5: fix Tx " Michael Baum
2021-01-06 21:47   ` Thomas Monjalon

patches for DPDK stable branches

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.dpdk.org/stable/0 stable/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 stable stable/ https://inbox.dpdk.org/stable \
		stable@dpdk.org
	public-inbox-index stable

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.stable


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git