Re: [PATCH] net: lan966x: fix page_pool error handling in lan966x_fdma_rx_alloc_page_pool()
From: Joe Damato
Date: Thu Apr 02 2026 - 17:00:33 EST
On Thu, Apr 02, 2026 at 06:28:23PM +0100, David Carlier wrote:
> page_pool_create() can return an ERR_PTR on failure. The return value
> is used unconditionally in the loop that follows, passing the error
> pointer through xdp_rxq_info_reg_mem_model() into page_pool_use_xdp_mem(),
> which dereferences it, causing a kernel oops.
>
> Add an IS_ERR check after page_pool_create() to return early on failure.
>
> Fixes: 11871aba1974 ("net: lan96x: Use page_pool API")
> Cc: stable@xxxxxxxxxxxxxxx
> Signed-off-by: David Carlier <devnexen@xxxxxxxxx>
> ---
> drivers/net/ethernet/microchip/lan966x/lan966x_fdma.c | 3 +++
> 1 file changed, 3 insertions(+)
Reviewed-by: Joe Damato <joe@xxxxxxx>