octeontx2-af: Fix PF driver crash with kexec kernel booting
PATCH v2 1/1 octeontx2-af: Fix PF driver crash with kexec kernel booting
During a kexec reboot the hardware is not power-cycled, so AF state from the old kernel can persist into the new kernel. When AF and PF drivers are built as modules, the PF driver may probe before AF reinitializes the hardware.
The PF driver treats the RVUM block revision as an indication that AF initialization is complete. If this value is left uncleared at shutdown, PF may incorrectly assume AF is ready and access stale hardware state, leading to a crash.
Clear the RVUM block revision during AF shutdown to avoid PF mis-detecting AF readiness after kexec.
(1) https://lore.kernel.org/all/[email protected]/
---
v2:
- Update commit message
- Add Reviewed-by
drivers/net/ethernet/marvell/octeontx2/af/rvu.c | 11 +++++++++++ 1 file changed, 11 insertions(+)
drivers/net/ethernet/marvell/octeontx2/af/rvu.c +11 -0
@@ -3632,11 +3632,22 @@ static void rvu_remove(struct pci_dev *pdev)devm_kfree (&pdev->dev, rvu); } +static void rvu_shutdown (struct pci_dev *pdev) +{ +struct rvu *rvu =pci_get_drvdata (pdev); + +if (!rvu) +return ; + +rvu_clear_rvum_blk_revid (rvu); +} +static struct pci_driver rvu_driver = { .name =DRV_NAME , .id_table = rvu_id_table, .probe = rvu_probe, .remove = rvu_remove, + .shutdown = rvu_shutdown, };static int __init rvu_init_module (void )
Signature · 1 line
2.25.1
This patch was applied to netdev/net.git (main) by Jakub Kicinski <[email protected]>:
Hello:
This patch was applied to netdev/net.git (main)
by Jakub Kicinski <[email protected]>:
Quoted 11 lines · On Tue, 3 Feb 2026 10:37:01 +0530 you wrote:
During a kexec reboot the hardware is not power-cycled, so AF state from the old kernel can persist into the new kernel. When AF and PF drivers are built as modules, the PF driver may probe before AF reinitializes the hardware.
The PF driver treats the RVUM block revision as an indication that AF initialization is complete. If this value is left uncleared at shutdown, PF may incorrectly assume AF is ready and access stale hardware state, leading to a crash.
[...]
Here is the summary with links:
- [v2] octeontx2-af: Fix PF driver crash with kexec kernel booting
https://git.kernel.org/netdev/net/c/2d2d574309e3
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html