Thread View: linux.kernel.netdev
1 messages
1 total messages
Started by Ziheng Wei
Mon, 23 Nov 2026 10:23
[PATCH net] octeontx2-pf: propagate ME IRQ registration failures
Author: Ziheng Wei
Date: Mon, 23 Nov 2026 10:23
Date: Mon, 23 Nov 2026 10:23
77 lines
10795 bytes
10795 bytes
ME request_irq() failures are only logged. The next request overwrites
ret, so SR-IOV is enabled without its ME handler:
request_irq(ME) fails -> ret overwritten -> SR-IOV reports success
-> ME events have no handler
Return ME errors like FLR errors and unwind all IRQs already registered
by the failing call.
Found by LLM-assisted static analysis. Build tested with allmodconfig;
no runtime fault-injection test.
Fixes: d424b6c02415 ("octeontx2-pf: Enable SRIOV and added VF mbox handling")
Cc: stable@vger.kernel.org
Signed-off-by: Ziheng Wei <zihengw03@163.com>
---
.../net/ethernet/marvell/octeontx2/nic/otx2_pf.c | 14 ++++++++++++--
1 file changed, 12 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c
index cb602a4ad..9263be611 100644
--- a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c
+++ b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c
@@ -213,6 +213,7 @@ static int otx2_register_flr_me_intr(struct otx2_nic *pf, int numvfs)
if (ret) {
dev_err(pf->dev,
"RVUPF: IRQ registration failed for ME0\n");
+ return ret;
}
/* Register FLR interrupt handler */
@@ -224,7 +225,7 @@ static int otx2_register_flr_me_intr(struct otx2_nic *pf, int numvfs)
if (ret) {
dev_err(pf->dev,
"RVUPF: IRQ registration failed for FLR0\n");
- return ret;
+ goto free_me0;
}
if (numvfs > 64) {
@@ -237,6 +238,7 @@ static int otx2_register_flr_me_intr(struct otx2_nic *pf, int numvfs)
if (ret) {
dev_err(pf->dev,
"RVUPF: IRQ registration failed for ME1\n");
+ goto free_flr0;
}
irq_name = &hw->irq_name[RVU_PF_INT_VEC_VFFLR1 * NAME_SIZE];
snprintf(irq_name, NAME_SIZE, "RVUPF%d_FLR1",
@@ -247,7 +249,7 @@ static int otx2_register_flr_me_intr(struct otx2_nic *pf, int numvfs)
if (ret) {
dev_err(pf->dev,
"RVUPF: IRQ registration failed for FLR1\n");
- return ret;
+ goto free_me1;
}
}
@@ -271,6 +273,14 @@ static int otx2_register_flr_me_intr(struct otx2_nic *pf, int numvfs)
INTR_MASK(numvfs));
}
return 0;
+
+free_me1:
+ free_irq(pci_irq_vector(pf->pdev, RVU_PF_INT_VEC_VFME1), pf);
+free_flr0:
+ free_irq(pci_irq_vector(pf->pdev, RVU_PF_INT_VEC_VFFLR0), pf);
+free_me0:
+ free_irq(pci_irq_vector(pf->pdev, RVU_PF_INT_VEC_VFME0), pf);
+ return ret;
}
static int otx2_pf_flr_init(struct otx2_nic *pf, int num_vfs)
base-commit: 97d73c8251226cf27cc6656b4c542869bb8c69fa
--
2.43.0
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads