Re: [PATCH] crypto: octeontx2: fix IRQ vector leak in otx2_cptpf_probe()
From: Herbert Xu
Date: Thu Apr 16 2026 - 05:21:18 EST
On Tue, Apr 14, 2026 at 08:38:57PM +0800, Guangshuo Li wrote:
>
> diff --git a/drivers/crypto/marvell/octeontx2/otx2_cptpf_main.c b/drivers/crypto/marvell/octeontx2/otx2_cptpf_main.c
> index 346d1345f11c..059f702dbf5c 100644
> --- a/drivers/crypto/marvell/octeontx2/otx2_cptpf_main.c
> +++ b/drivers/crypto/marvell/octeontx2/otx2_cptpf_main.c
> @@ -783,7 +783,7 @@ static int otx2_cptpf_probe(struct pci_dev *pdev,
> /* Initialize AF-PF mailbox */
> err = cptpf_afpf_mbox_init(cptpf);
> if (err)
> - goto clear_drvdata;
> + goto free_irq_vectors;
> /* Register mailbox interrupt */
> err = cptpf_register_afpf_mbox_intr(cptpf);
> if (err)
> @@ -826,6 +826,8 @@ static int otx2_cptpf_probe(struct pci_dev *pdev,
> cptpf_disable_afpf_mbox_intr(cptpf);
> destroy_afpf_mbox:
> cptpf_afpf_mbox_destroy(cptpf);
> +free_irq_vectors:
> + pci_free_irq_vectors(pdev);
Good catch. But what about the remove path, shouldn't the vectors
be freed there as well?
Thanks,
--
Email: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt