mirror-linux/drivers/net/ethernet/airoha
Lorenzo Bianconi 4b91cb6578 net: airoha: Add size check for TX NAPIs in airoha_qdma_cleanup()
If airoha_qdma_init routine fails before airoha_qdma_tx_irq_init() runs
successfully for all TX NAPIs, airoha_qdma_cleanup() will
unconditionally runs netif_napi_del() on TX NAPIs, triggering a NULL
pointer dereference. Fix the issue relying on q_tx_irq size value to
check if the TX NAPIs is properly initialized in airoha_qdma_cleanup().
Moreover, run netif_napi_add_tx() just if irq_q queue is properly
allocated.

Fixes: 23020f0493 ("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-2-d99347e5c18d@kernel.org
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
2026-04-23 12:17:35 +02:00
..
Kconfig net: airoha: Add FLOW_CLS_STATS callback support 2025-05-20 20:00:51 -07:00
Makefile net: airoha: Introduce PPE debugfs support 2025-03-04 13:22:10 +01:00
airoha_eth.c net: airoha: Add size check for TX NAPIs in airoha_qdma_cleanup() 2026-04-23 12:17:35 +02:00
airoha_eth.h net: airoha: Fix PPE cpu port configuration for GDM2 loopback path 2026-04-21 14:46:22 +02:00
airoha_npu.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
airoha_ppe.c net: airoha: Fix PPE cpu port configuration for GDM2 loopback path 2026-04-21 14:46:22 +02:00
airoha_ppe_debugfs.c net: airoha: ppe: Move PPE memory info in airoha_eth_soc_data struct 2025-10-21 13:07:04 +02:00
airoha_regs.h net: airoha: Reset PPE cpu port configuration in airoha_ppe_hw_init() 2026-03-20 18:27:49 -07:00