All of lore.kernel.org
 help / color / mirror / Atom feed
From: Saeed Mahameed <saeedm@mellanox.com>
To: "David S. Miller" <davem@davemloft.net>
Cc: netdev@vger.kernel.org, Raed Salem <raeds@mellanox.com>,
	Saeed Mahameed <saeedm@mellanox.com>
Subject: [net 05/10] net/mlx5: E-Switch, Fix memory leak when creating switchdev mode FDB tables
Date: Wed,  5 Sep 2018 21:09:47 -0700	[thread overview]
Message-ID: <20180906040952.29684-6-saeedm@mellanox.com> (raw)
In-Reply-To: <20180906040952.29684-1-saeedm@mellanox.com>

From: Raed Salem <raeds@mellanox.com>

The memory allocated for the slow path table flow group input structure
was not freed upon successful return, fix that.

Fixes: 1967ce6ea5c8 ("net/mlx5: E-Switch, Refactor fast path FDB table creation in switchdev mode")
Signed-off-by: Raed Salem <raeds@mellanox.com>
Reviewed-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
---
 drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c b/drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c
index f72b5c9dcfe9..3028e8d90920 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c
@@ -663,6 +663,7 @@ static int esw_create_offloads_fdb_tables(struct mlx5_eswitch *esw, int nvports)
 	if (err)
 		goto miss_rule_err;
 
+	kvfree(flow_group_in);
 	return 0;
 
 miss_rule_err:
-- 
2.17.1

  parent reply	other threads:[~2018-09-06  8:43 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-06  4:09 [pull request][net 00/10] Mellanox, mlx5 fixes 2018-09-05 Saeed Mahameed
2018-09-06  4:09 ` [net 01/10] net/mlx5: Fix use-after-free in self-healing flow Saeed Mahameed
2018-09-06  4:09 ` [net 02/10] net/mlx5: Fix debugfs cleanup in the device init/remove flow Saeed Mahameed
2018-09-06  4:09 ` [net 03/10] net/mlx5: Use u16 for Work Queue buffer fragment size Saeed Mahameed
2018-09-06  4:09 ` [net 04/10] net/mlx5: Use u16 for Work Queue buffer strides offset Saeed Mahameed
2018-09-06  4:09 ` Saeed Mahameed [this message]
2018-09-06  4:09 ` [net 06/10] net/mlx5: Fix not releasing read lock when adding flow rules Saeed Mahameed
2018-09-06  4:09 ` [net 07/10] net/mlx5: Consider PCI domain in search for next dev Saeed Mahameed
2018-09-06  4:09 ` [net 08/10] net/mlx5: Check for error in mlx5_attach_interface Saeed Mahameed
2018-09-06  4:09 ` [net 09/10] net/mlx5e: Ethtool steering, fix udp source port value Saeed Mahameed
2018-09-06  4:09 ` [net 10/10] net/mlx5: Fix possible deadlock from lockdep when adding fte to fg Saeed Mahameed
2018-09-06 14:57 ` [pull request][net 00/10] Mellanox, mlx5 fixes 2018-09-05 David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180906040952.29684-6-saeedm@mellanox.com \
    --to=saeedm@mellanox.com \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    --cc=raeds@mellanox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.