[PATCH net] net: airoha: Fix NULL pointer dereference in airoha_qdma_cleanup_rx_queue()

Simon Horman horms at kernel.org
Wed Jul 17 03:40:30 PDT 2024


On Wed, Jul 17, 2024 at 10:47:19AM +0200, Lorenzo Bianconi wrote:
> Move page_pool_get_dma_dir() inside the while loop of
> airoha_qdma_cleanup_rx_queue routine in order to avoid possible NULL
> pointer dereference if airoha_qdma_init_rx_queue() fails before
> properly allocating the page_pool pointer.
> 
> Fixes: 23020f049327 ("net: airoha: Introduce ethernet support for EN7581 SoC")
> Signed-off-by: Lorenzo Bianconi <lorenzo at kernel.org>

Reviewed-by: Simon Horman <horms at kernel.org>




More information about the Linux-mediatek mailing list