summaryrefslogtreecommitdiff
path: root/scripts/basic
diff options
context:
space:
mode:
authorLorenzo Bianconi <lorenzo@kernel.org>2026-04-20 11:07:47 +0300
committerPaolo Abeni <pabeni@redhat.com>2026-04-23 13:17:35 +0300
commit379050947a1828826ad7ea50c95245a56929b35a (patch)
treed0489f94a651fa3351ed70582a15565ea2b29a6b /scripts/basic
parent7dddc74af369478ba7f9bc136d0fc1dc4570cb66 (diff)
downloadlinux-379050947a1828826ad7ea50c95245a56929b35a.tar.xz
net: airoha: Move ndesc initialization at end of airoha_qdma_init_rx_queue()
If queue entry or DMA descriptor list allocation fails in airoha_qdma_init_rx_queue routine, airoha_qdma_cleanup() will trigger a NULL pointer dereference running netif_napi_del() for RX queue NAPIs since netif_napi_add() has never been executed to this particular RX NAPI. The issue is due to the early ndesc initialization in airoha_qdma_init_rx_queue() since airoha_qdma_cleanup() relies on ndesc value to check if the queue is properly initialized. Fix the issue moving ndesc initialization at end of airoha_qdma_init_tx routine. Move page_pool allocation after descriptor list allocation in order to avoid memory leaks if desc allocation fails. Fixes: 23020f049327 ("net: airoha: Introduce ethernet support for EN7581 SoC") Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Link: https://patch.msgid.link/20260420-airoha_qdma_init_rx_queue-fix-v2-1-d99347e5c18d@kernel.org Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Diffstat (limited to 'scripts/basic')
0 files changed, 0 insertions, 0 deletions