Skip to content

net/stmmac: Secure against failures of DMA memory allocation

Jakub Raczynski linux-arm-kernel lkml netdev 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest2 patches 4 repliesIn review
  2. v21 of 2 patches 0 repliesSuperseded
  3. v11 patch 4 repliesSuperseded

Changes in v3 from the cover letter

- Added null assignment to page pointers (suggested by sashiko)
- Convert IS_ERR_OR_NULL check to just NULL check

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2net/stmmac: Set Rx queue page_pool to NULL when freeing DMA resourcesdrivers/net/ethernet/stmicro/stmmac/stmmac_main.c+2 -21 reply
2/2net/stmmac: Prevent dma queue NULL free on allocation failuredrivers/net/ethernet/stmicro/stmmac/stmmac_main.c+19 -90 replies

Reviews trailers per patch

1 of 2 patches has a Reviewed-by or Acked-by.

PatchMaxime ChevallierMina Almasry
1/2R-b R-b
2/2

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/stmmac: Secure against failures of DMA memory allocation

This series fixing two issues related to fails of __alloc_dma_rx_desc_resources(). Original issue from 1st patch is related to page_pool that has happened in testing env, while second was requested by Sashiko to have similar change for DMA allocation.
To have complete fix for all failures of __alloc_dma_rx_desc_resources(), merge two fixes into series.

---
Changes in v3:
- Added null assignment to page pointers (suggested by sashiko)
- Convert IS_ERR_OR_NULL check to just NULL check

Changes in v2:
- Added reviewed by Maxime to first patch
- Dropped null check as page_pool_destroy() does provide that
- Modified comment to reflect that

Link to v2:
https://lore.kernel.org/all/[email protected]/

Link to v1:
https://lore.kernel.org/netdev/[email protected]/

Jakub Raczynski (2):
net/stmmac: Set Rx queue page_pool to NULL when freeing DMA resources net/stmmac: Prevent dma queue NULL free on allocation failure

 .../net/ethernet/stmicro/stmmac/stmmac_main.c | 32 ++++++++++++-------
 1 file changed, 21 insertions(+), 11 deletions(-)
Signature · 1 line
2.34.1