public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH net v2 0/2] net: liquidio: Fix memory leaks in setup_nic_devices()
@ 2026-01-24 12:42 Zilin Guan
  2026-01-24 12:42 ` [PATCH net v2 1/2] net: liquidio: Fix off-by-one error in setup_nic_devices() cleanup Zilin Guan
  2026-01-24 12:42 ` [PATCH net v2 2/2] net: liquidio: Initialize netdev pointer before queue setup Zilin Guan
  0 siblings, 2 replies; 9+ messages in thread
From: Zilin Guan @ 2026-01-24 12:42 UTC (permalink / raw)
  To: andrew+netdev
  Cc: davem, edumazet, kuba, pabeni, marco.crivellari, vadim.fedorenko,
	kory.maincent, netdev, linux-kernel, horms, jianhao.xu,
	Zilin Guan

Patch 1 fixes an off-by-one error in the cleanup loop. Using a do-while 
loop ensures the current device index is also cleaned up.

Patch 2 moves the initialization of oct->props[i].netdev before queue 
setup calls. This ensures that if queue setup fails, the cleanup function 
can find the allocated netdev.

Signed-off-by: Zilin Guan <zilin@seu.edu.cn>

Changes in v2:
- Add patch 1 to fix an off-by-one error in the error handling loop logic.

Zilin Guan (2):
  net: liquidio: Fix off-by-one error in setup_nic_devices() cleanup
  net: liquidio: Initialize netdev pointer before queue setup

 .../net/ethernet/cavium/liquidio/lio_main.c   | 24 +++++++++----------
 .../ethernet/cavium/liquidio/lio_vf_main.c    |  4 ++--
 2 files changed, 14 insertions(+), 14 deletions(-)

-- 
2.34.1


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

end of thread, other threads:[~2026-01-27 10:11 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-24 12:42 [PATCH net v2 0/2] net: liquidio: Fix memory leaks in setup_nic_devices() Zilin Guan
2026-01-24 12:42 ` [PATCH net v2 1/2] net: liquidio: Fix off-by-one error in setup_nic_devices() cleanup Zilin Guan
2026-01-26 15:50   ` [net,v2,1/2] " Simon Horman
2026-01-26 15:56     ` Simon Horman
2026-01-27 10:06       ` Zilin Guan
2026-01-24 12:42 ` [PATCH net v2 2/2] net: liquidio: Initialize netdev pointer before queue setup Zilin Guan
2026-01-26 15:49   ` [net,v2,2/2] " Simon Horman
2026-01-26 15:52     ` Simon Horman
2026-01-27 10:11       ` Zilin Guan

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