Netdev List
 help / color / mirror / Atom feed
* [PATCH net 0/2] mlxsw: Fix port range register leak
@ 2026-10-06 14:21 Petr Machata
  2026-10-06 14:21 ` [PATCH net 1/2] mlxsw: spectrum_flower: Fix port range register leak in tmplt_create() Petr Machata
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Petr Machata @ 2026-10-06 14:21 UTC (permalink / raw)
  To: Andrew Lunn, David S. Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, netdev
  Cc: Ido Schimmel, Petr Machata, Wentao Liang, mlxsw

When the mlxsw driver parses a port range template rule, it acquires the
actual port range registers. The parsing is only done to determine the
element usage, so the registers can be deallocated right away, but this is
never done, and the registers are leaked. Plug this leak and add a selftest
that would have caught it.

Petr Machata (2):
  mlxsw: spectrum_flower: Fix port range register leak in tmplt_create()
  selftests: mlxsw: Test port range occupancy on template create

 .../net/ethernet/mellanox/mlxsw/spectrum.h    |  2 ++
 .../ethernet/mellanox/mlxsw/spectrum_acl.c    | 10 +++++--
 .../ethernet/mellanox/mlxsw/spectrum_flower.c |  9 +++++--
 .../drivers/net/mlxsw/port_range_occ.sh       | 26 +++++++++++++++++++
 4 files changed, 43 insertions(+), 4 deletions(-)

-- 
2.55.0


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

end of thread, other threads:[~2026-10-08 18:00 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-06 14:21 [PATCH net 0/2] mlxsw: Fix port range register leak Petr Machata
2026-10-06 14:21 ` [PATCH net 1/2] mlxsw: spectrum_flower: Fix port range register leak in tmplt_create() Petr Machata
2026-10-06 21:49   ` Jacob Keller
2026-10-06 14:21 ` [PATCH net 2/2] selftests: mlxsw: Test port range occupancy on template create Petr Machata
2026-10-06 21:50   ` Jacob Keller
2026-10-08 18:00 ` [PATCH net 0/2] mlxsw: Fix port range register leak 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