public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v7 0/2] net/mlx5: Fix NULL dereference and memory leak in ttc_table creation
@ 2025-04-18  2:38 Henry Martin
  2025-04-18  2:38 ` [PATCH v7 1/2] net/mlx5: Fix null-ptr-deref in mlx5_create_{inner_,}ttc_table() Henry Martin
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Henry Martin @ 2025-04-18  2:38 UTC (permalink / raw)
  To: saeedm, leon, tariqt, andrew+netdev, davem, edumazet, kuba,
	pabeni, bsdhenrymartin, mbloch, amirtz
  Cc: netdev, linux-rdma, linux-kernel

This patch series addresses two issues in the
mlx5_create_inner_ttc_table() and mlx5_create_ttc_table() functions:

1. A potential NULL pointer dereference if mlx5_get_flow_namespace()
returns NULL.

2. A memory leak in the error path when ttc_type is invalid (default:
switch case).

Henry Martin (2):
  net/mlx5: Fix null-ptr-deref in mlx5_create_{inner_,}ttc_table()
  net/mlx5: Move ttc allocation after switch case to prevent leaks

 .../ethernet/mellanox/mlx5/core/lib/fs_ttc.c  | 26 +++++++++++++------
 1 file changed, 18 insertions(+), 8 deletions(-)

-- 
2.34.1


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

end of thread, other threads:[~2025-04-22  9:09 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-18  2:38 [PATCH v7 0/2] net/mlx5: Fix NULL dereference and memory leak in ttc_table creation Henry Martin
2025-04-18  2:38 ` [PATCH v7 1/2] net/mlx5: Fix null-ptr-deref in mlx5_create_{inner_,}ttc_table() Henry Martin
2025-04-21  9:50   ` Markus Elfring
2025-04-18  2:38 ` [PATCH v7 2/2] net/mlx5: Move ttc allocation after switch case to prevent leaks Henry Martin
2025-04-21  9:10 ` [PATCH v7 0/2] net/mlx5: Fix NULL dereference and memory leak in ttc_table creation Markus Elfring
2025-04-22  9:10 ` patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox