All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: Mark Bloch <mbloch@nvidia.com>
Cc: Henry Martin <bsdhenrymartin@gmail.com>,
	saeedm@nvidia.com, leon@kernel.org, tariqt@nvidia.com,
	andrew+netdev@lunn.ch, davem@davemloft.net, edumazet@google.com,
	pabeni@redhat.com, michal.swiatkowski@linux.intel.com,
	amirtz@nvidia.com, netdev@vger.kernel.org,
	linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v6 2/2] net/mlx5: Move ttc allocation after switch case to prevent leaks
Date: Thu, 17 Apr 2025 08:04:22 -0700	[thread overview]
Message-ID: <20250417080422.6a22ff04@kernel.org> (raw)
In-Reply-To: <817d5a9f-63c0-40b2-8e97-4a29185c0455@nvidia.com>

On Wed, 16 Apr 2025 15:02:13 +0300 Mark Bloch wrote:
> On 16/04/2025 12:22, Henry Martin wrote:
> > Relocate the memory allocation for ttc table after the switch statement
> > that validates params->ns_type in both mlx5_create_inner_ttc_table() and
> > mlx5_create_ttc_table(). This ensures memory is only allocated after
> > confirming valid input, eliminating potential memory leaks when invalid
> > ns_type cases occur.
> 
> Reviewed-by: Mark Bloch <mbloch@nvidia.com>

A bit hard to see from the context but I'm guessing this fixes 
a memory leak? We need a Fixes tag..

reminder: please trim your replies
-- 
pw-bot: cr

  reply	other threads:[~2025-04-17 15:04 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-16  9:22 [PATCH v6 0/2] net/mlx5: Fix NULL dereference and memory leak in ttc_table creation Henry Martin
2025-04-16  9:22 ` [PATCH v6 1/2] net/mlx5: Fix null-ptr-deref in mlx5_create_{inner_,}ttc_table() Henry Martin
2025-04-16 19:00   ` Markus Elfring
2025-04-16  9:22 ` [PATCH v6 2/2] net/mlx5: Move ttc allocation after switch case to prevent leaks Henry Martin
2025-04-16 11:06   ` Michal Swiatkowski
2025-04-16 12:02   ` Mark Bloch
2025-04-17 15:04     ` Jakub Kicinski [this message]
2025-04-18  2:42       ` henry martin
2025-04-16 18:38 ` [PATCH v6 0/2] net/mlx5: Fix NULL dereference and memory leak in ttc_table creation Markus Elfring

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=20250417080422.6a22ff04@kernel.org \
    --to=kuba@kernel.org \
    --cc=amirtz@nvidia.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=bsdhenrymartin@gmail.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=leon@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=mbloch@nvidia.com \
    --cc=michal.swiatkowski@linux.intel.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=saeedm@nvidia.com \
    --cc=tariqt@nvidia.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.