* [PATCH 1/2] octeontx2-vf: fix bitmap leak [not found] <20250927071505.915905-1-bo@mboxify.com> @ 2025-09-27 7:15 ` Bo Sun 2025-09-29 10:11 ` Simon Horman 2025-09-27 7:15 ` [PATCH 2/2] octeontx2-pf: " Bo Sun 1 sibling, 1 reply; 7+ messages in thread From: Bo Sun @ 2025-09-27 7:15 UTC (permalink / raw) To: sgoutham, gakula, kuba, pabeni; +Cc: netdev, linux-kernel, Bo Sun, stable The bitmap allocated with bitmap_zalloc() in otx2vf_probe() was not released in otx2vf_remove(). Unbinding and rebinding the driver therefore triggers a kmemleak warning: unreferenced object (size 8): backtrace: bitmap_zalloc otx2vf_probe Call bitmap_free() in the remove path to fix the leak. Fixes: efabce290151 ("octeontx2-pf: AF_XDP zero copy receive support") Cc: stable@vger.kernel.org Signed-off-by: Bo Sun <bo@mboxify.com> --- drivers/net/ethernet/marvell/octeontx2/nic/otx2_vf.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_vf.c b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_vf.c index 7ebb6e656884..25381f079b97 100644 --- a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_vf.c +++ b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_vf.c @@ -854,6 +854,7 @@ static void otx2vf_remove(struct pci_dev *pdev) qmem_free(vf->dev, vf->dync_lmt); otx2vf_vfaf_mbox_destroy(vf); pci_free_irq_vectors(vf->pdev); + bitmap_free(vf->af_xdp_zc_qidx); pci_set_drvdata(pdev, NULL); free_netdev(netdev); } ^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH 1/2] octeontx2-vf: fix bitmap leak 2025-09-27 7:15 ` [PATCH 1/2] octeontx2-vf: fix bitmap leak Bo Sun @ 2025-09-29 10:11 ` Simon Horman 2025-09-29 14:49 ` Bo Sun 0 siblings, 1 reply; 7+ messages in thread From: Simon Horman @ 2025-09-29 10:11 UTC (permalink / raw) To: Bo Sun; +Cc: sgoutham, gakula, kuba, pabeni, netdev, linux-kernel, stable On Sat, Sep 27, 2025 at 03:15:04PM +0800, Bo Sun wrote: > The bitmap allocated with bitmap_zalloc() in otx2vf_probe() was not > released in otx2vf_remove(). Unbinding and rebinding the driver therefore > triggers a kmemleak warning: > > unreferenced object (size 8): > backtrace: > bitmap_zalloc > otx2vf_probe > > Call bitmap_free() in the remove path to fix the leak. > > Fixes: efabce290151 ("octeontx2-pf: AF_XDP zero copy receive support") > Cc: stable@vger.kernel.org > Signed-off-by: Bo Sun <bo@mboxify.com> Reviewed-by: Simon Horman <horms@kernel.org> For reference, as a fix for code present in net, this series should be targeted at net, like this: Subject: [PATCH net 1/2] ... See: https://docs.kernel.org/process/maintainer-netdev.html ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 1/2] octeontx2-vf: fix bitmap leak 2025-09-29 10:11 ` Simon Horman @ 2025-09-29 14:49 ` Bo Sun 2025-09-30 1:53 ` Jakub Kicinski 0 siblings, 1 reply; 7+ messages in thread From: Bo Sun @ 2025-09-29 14:49 UTC (permalink / raw) To: Simon Horman; +Cc: sgoutham, gakula, kuba, pabeni, netdev, linux-kernel, stable On 2025-09-29 18:11, Simon Horman wrote: > On Sat, Sep 27, 2025 at 03:15:04PM +0800, Bo Sun wrote: >> The bitmap allocated with bitmap_zalloc() in otx2vf_probe() was not >> released in otx2vf_remove(). Unbinding and rebinding the driver >> therefore >> triggers a kmemleak warning: >> >> unreferenced object (size 8): >> backtrace: >> bitmap_zalloc >> otx2vf_probe >> >> Call bitmap_free() in the remove path to fix the leak. >> >> Fixes: efabce290151 ("octeontx2-pf: AF_XDP zero copy receive support") >> Cc: stable@vger.kernel.org >> Signed-off-by: Bo Sun <bo@mboxify.com> > > Reviewed-by: Simon Horman <horms@kernel.org> > > For reference, as a fix for code present in net, this series > should be targeted at net, like this: > > Subject: [PATCH net 1/2] ... > > See: https://docs.kernel.org/process/maintainer-netdev.html Thanks for pointing this out. I’ll resend v2 for the net tree with the correct subject prefix. Best regards, Bo ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 1/2] octeontx2-vf: fix bitmap leak 2025-09-29 14:49 ` Bo Sun @ 2025-09-30 1:53 ` Jakub Kicinski 2025-09-30 5:46 ` Bo Sun 0 siblings, 1 reply; 7+ messages in thread From: Jakub Kicinski @ 2025-09-30 1:53 UTC (permalink / raw) To: Bo Sun; +Cc: Simon Horman, sgoutham, gakula, pabeni, netdev, linux-kernel, stable On Mon, 29 Sep 2025 22:49:54 +0800 Bo Sun wrote: > I’ll resend v2 for the net tree with the correct subject prefix. Since you promised a v2 - could you also make sure you CC the people who signed off on the bad change? get_maintainer will point them out. Unless you know their address will bounce, in which case please mention that in the cover letter. ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 1/2] octeontx2-vf: fix bitmap leak 2025-09-30 1:53 ` Jakub Kicinski @ 2025-09-30 5:46 ` Bo Sun 0 siblings, 0 replies; 7+ messages in thread From: Bo Sun @ 2025-09-30 5:46 UTC (permalink / raw) To: Jakub Kicinski Cc: Simon Horman, sgoutham, gakula, pabeni, netdev, linux-kernel, stable On 2025-09-30 09:53, Jakub Kicinski wrote: > On Mon, 29 Sep 2025 22:49:54 +0800 Bo Sun wrote: >> I’ll resend v2 for the net tree with the correct subject prefix. > > Since you promised a v2 - could you also make sure you CC the people > who signed off on the bad change? get_maintainer will point them out. > Unless you know their address will bounce, in which case please mention > that in the cover letter. Sure, I’ll CC all sign-off authors and everyone get_maintainer lists in v2. ^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 2/2] octeontx2-pf: fix bitmap leak [not found] <20250927071505.915905-1-bo@mboxify.com> 2025-09-27 7:15 ` [PATCH 1/2] octeontx2-vf: fix bitmap leak Bo Sun @ 2025-09-27 7:15 ` Bo Sun 2025-09-29 10:12 ` Simon Horman 1 sibling, 1 reply; 7+ messages in thread From: Bo Sun @ 2025-09-27 7:15 UTC (permalink / raw) To: sgoutham, gakula, kuba, pabeni; +Cc: netdev, linux-kernel, Bo Sun, stable The bitmap allocated with bitmap_zalloc() in otx2_probe() was not released in otx2_remove(). Unbinding and rebinding the driver therefore triggers a kmemleak warning: unreferenced object (size 8): backtrace: bitmap_zalloc otx2_probe Call bitmap_free() in the remove path to fix the leak. Fixes: efabce290151 ("octeontx2-pf: AF_XDP zero copy receive support") Cc: stable@vger.kernel.org Signed-off-by: Bo Sun <bo@mboxify.com> --- drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c index 5027fae0aa77..e808995703cf 100644 --- a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c +++ b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c @@ -3542,6 +3542,7 @@ static void otx2_remove(struct pci_dev *pdev) otx2_disable_mbox_intr(pf); otx2_pfaf_mbox_destroy(pf); pci_free_irq_vectors(pf->pdev); + bitmap_free(pf->af_xdp_zc_qidx); pci_set_drvdata(pdev, NULL); free_netdev(netdev); } ^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH 2/2] octeontx2-pf: fix bitmap leak 2025-09-27 7:15 ` [PATCH 2/2] octeontx2-pf: " Bo Sun @ 2025-09-29 10:12 ` Simon Horman 0 siblings, 0 replies; 7+ messages in thread From: Simon Horman @ 2025-09-29 10:12 UTC (permalink / raw) To: Bo Sun; +Cc: sgoutham, gakula, kuba, pabeni, netdev, linux-kernel, stable On Sat, Sep 27, 2025 at 03:15:05PM +0800, Bo Sun wrote: > The bitmap allocated with bitmap_zalloc() in otx2_probe() was not > released in otx2_remove(). Unbinding and rebinding the driver therefore > triggers a kmemleak warning: > > unreferenced object (size 8): > backtrace: > bitmap_zalloc > otx2_probe > > Call bitmap_free() in the remove path to fix the leak. > > Fixes: efabce290151 ("octeontx2-pf: AF_XDP zero copy receive support") > Cc: stable@vger.kernel.org > Signed-off-by: Bo Sun <bo@mboxify.com> Reviewed-by: Simon Horman <horms@kernel.org> ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2025-09-30 5:51 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20250927071505.915905-1-bo@mboxify.com>
2025-09-27 7:15 ` [PATCH 1/2] octeontx2-vf: fix bitmap leak Bo Sun
2025-09-29 10:11 ` Simon Horman
2025-09-29 14:49 ` Bo Sun
2025-09-30 1:53 ` Jakub Kicinski
2025-09-30 5:46 ` Bo Sun
2025-09-27 7:15 ` [PATCH 2/2] octeontx2-pf: " Bo Sun
2025-09-29 10:12 ` Simon Horman
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox