eth: fbnic: Fix payload page pool error cleanup
Subsystems (3)
PATCH 1/1 eth: fbnic: Fix payload page pool error cleanup
The payload page pool pointer contains an error pointer when its allocation fails. The cleanup path passes that error pointer to page_pool_destroy() instead of destroying the header page pool. This can dereference the error pointer and leave the header page pool allocated.
Destroy the header page pool instead.
--- drivers/net/ethernet/meta/fbnic/fbnic_txrx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/meta/fbnic/fbnic_txrx.c +1 -1
@@ -1599,7 +1599,7 @@ fbnic_alloc_qt_page_pools(struct fbnic_net *fbn, struct fbnic_q_triad *qt,return 0 ; err_destroy_sub0: -page_pool_destroy (pp); +page_pool_destroy (qt->sub0.page_pool);return PTR_ERR (pp); }
base-commit: 18a6fe05fb6e18de29fa90d388bb34044114b3d8
Signature · 1 line
2.55.0
Quoted 6 lines · Björn Töpel
The payload page pool pointer contains an error pointer when its allocation fails. The cleanup path passes that error pointer to
page_pool_destroy()instead of destroying the header page pool. This can dereference the error pointer and leave the header page pool allocated.
Quoted 6 lines
Destroy the header page pool instead.
Fixes 8a11010fdd96 ("eth: fbnic: allocate unreadable page pool for the payloads")Reported-by Sashiko <[email protected]>Signed-off-by Björn Töpel <[email protected]>
This patch was applied to netdev/net.git (main) by Jakub Kicinski <[email protected]>:
Hello:
This patch was applied to netdev/net.git (main)
by Jakub Kicinski <[email protected]>:
Quoted 9 lines · On Tue, 15 Sep 2026 12:49:15 +0200 you wrote:
The payload page pool pointer contains an error pointer when its allocation fails. The cleanup path passes that error pointer to
page_pool_destroy()instead of destroying the header page pool. This can dereference the error pointer and leave the header page pool allocated.Destroy the header page pool instead.
[...]
Here is the summary with links:
- [net] eth: fbnic: Fix payload page pool error cleanup
https://git.kernel.org/netdev/net/c/8e0b235bd918
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html