Commit 4b91cb6
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: 23020f0 ("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>1 parent 3790509 commit 4b91cb6
1 file changed
Lines changed: 8 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1020 | 1020 | | |
1021 | 1021 | | |
1022 | 1022 | | |
1023 | | - | |
1024 | | - | |
1025 | 1023 | | |
1026 | 1024 | | |
1027 | 1025 | | |
| |||
1031 | 1029 | | |
1032 | 1030 | | |
1033 | 1031 | | |
| 1032 | + | |
| 1033 | + | |
| 1034 | + | |
1034 | 1035 | | |
1035 | 1036 | | |
1036 | 1037 | | |
| |||
1450 | 1451 | | |
1451 | 1452 | | |
1452 | 1453 | | |
1453 | | - | |
| 1454 | + | |
| 1455 | + | |
| 1456 | + | |
| 1457 | + | |
1454 | 1458 | | |
| 1459 | + | |
1455 | 1460 | | |
1456 | 1461 | | |
1457 | 1462 | | |
| |||
0 commit comments