All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net v3 0/2] net: sxgbe: fix descriptor ring allocation failure handling
@ 2026-07-23  2:18 Chenguang Zhao
  2026-07-23  2:18 ` [PATCH net v3 1/2] net: sxgbe: free TX rings on RX allocation failure Chenguang Zhao
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Chenguang Zhao @ 2026-07-23  2:18 UTC (permalink / raw)
  To: bh74.an, andrew+netdev, davem, edumazet, kuba, pabeni
  Cc: netdev, chenguang.zhao, Chenguang Zhao

From: Chenguang Zhao <zhaochenguang@kylinos.cn>

init_dma_desc_rings() leaks already-allocated TX rings
when RX allocation fails, and sxgbe_open() ignores its
return value and continues with invalid DMA rings. Fix
the cleanup path and check the error.

Patch 1 frees TX rings on RX allocation failure.
Patch 2 makes sxgbe_open() handle init_dma_desc_rings() failure.

Chenguang Zhao (2):
  net: sxgbe: free TX rings on RX allocation failure
  net: sxgbe: check descriptor ring allocation failures

 drivers/net/ethernet/samsung/sxgbe/sxgbe_main.c | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

---
v3:
- Patch 1: Per Vadim’s suggestion, reuse the existing
  code for cleaning up Tx rings

v2:
 https://lore.kernel.org/all/20260722014055.157269-1-chenguang.zhao@linux.dev/

v1:
 https://lore.kernel.org/all/20260720024747.504493-1-chenguang.zhao@linux.dev/
-- 
2.25.1

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

end of thread, other threads:[~2026-07-29  8:40 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-23  2:18 [PATCH net v3 0/2] net: sxgbe: fix descriptor ring allocation failure handling Chenguang Zhao
2026-07-23  2:18 ` [PATCH net v3 1/2] net: sxgbe: free TX rings on RX allocation failure Chenguang Zhao
2026-07-23 10:07   ` Vadim Fedorenko
2026-07-23  2:18 ` [PATCH net v3 2/2] net: sxgbe: check descriptor ring allocation failures Chenguang Zhao
2026-07-23 10:11   ` Vadim Fedorenko
2026-07-23 13:42 ` [PATCH net v3 0/2] net: sxgbe: fix descriptor ring allocation failure handling Jakub Kicinski
2026-07-29  8:40 ` patchwork-bot+netdevbpf

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.