Re: [PATCH net] octeontx2-pf: handle cn20k_pfvf_mbox_alloc() failure in otx2_pfvf_mbox_init()
From: patchwork-bot+netdevbpf
Date: Mon Nov 30 2026 - 22:01:02 EST
Hello:
This patch was applied to netdev/net-next.git (main)
by Willem de Bruijn <willemb@xxxxxxxxxx>:
On Fri, 20 Nov 2026 19:24:08 +0000 you wrote:
> On CN20K, cn20k_pfvf_mbox_alloc() returns ERR_PTR(-ENOMEM) when
> qmem_alloc() fails, but otx2_pfvf_mbox_init() assigns hwbase without
> checking IS_ERR(hwbase). On allocation failure, the error pointer is
> passed directly into otx2_mbox_init(), which writes reset headers to
> hwbase + devid * MBOX_SIZE and crashes the kernel.
>
> In addition, if otx2_mbox_init() fails on CN20K after
> cn20k_pfvf_mbox_alloc() succeeded, free_iomem: skips
> qmem_free(&pf->pdev->dev, pf->pfvf_mbox_addr), leaking the DMA mailbox
> allocation, and if the second otx2_mbox_init(&mbox->mbox_up, ...) call
> fails, &mbox->mbox is not destroyed.
>
> [...]
Here is the summary with links:
- [net] octeontx2-pf: handle cn20k_pfvf_mbox_alloc() failure in otx2_pfvf_mbox_init()
https://git.kernel.org/netdev/net-next/c/1fdb3da048ab
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html