Skip to content

net: sxgbe: fix descriptor ring allocation failure handling

Chenguang Zhao netdev 2 versions – Applied

Status from this message: This series was applied to netdev/net.git (main)

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest2 patches 3 repliesApplied 2/2
  2. v22 patches 1 replySuperseded

Changes in v3 from the cover letter

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

Patches in v3 All 2 applied

#Subject and filesSizeRepliesApplied
1/2net: sxgbe: free TX rings on RX allocation failuredrivers/net/ethernet/samsung/sxgbe/sxgbe_main.c+4 -51 replyApplied
2/2net: sxgbe: check descriptor ring allocation failuresdrivers/net/ethernet/samsung/sxgbe/sxgbe_main.c+4 -11 replyApplied

Reviews trailers per patch

All 2 patches have a Reviewed-by or Acked-by.

PatchVadim Fedorenko
1/2R-b
2/2R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v3 thread

Cover letter [PATCH net v3 0/2] net: sxgbe: fix descriptor ring allocation failure handling

From: Chenguang Zhao <[email protected]>

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/[email protected]/

v1:
https://lore.kernel.org/all/[email protected]/

Signature · 1 line
2.25.1