[PATCH net v3 0/2] net/stmmac: Secure against failures of DMA memory allocation

From: Jakub Raczynski

Date: Wed Jul 15 2026 - 08:42:28 EST


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/20260707174115.1264466-1-j.raczynski@xxxxxxxxxxx/

Link to v1:
https://lore.kernel.org/netdev/20260630100953.747868-1-j.raczynski@xxxxxxxxxxx/

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(-)

--
2.34.1