* [PATCH net v2 0/2] octeontx2: fix bitmap leaks in PF and VF
@ 2025-09-30 6:12 Bo Sun
2025-09-30 6:12 ` [PATCH net v2 1/2] octeontx2-vf: fix bitmap leak Bo Sun
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Bo Sun @ 2025-09-30 6:12 UTC (permalink / raw)
To: sgoutham, gakula, kuba, pabeni
Cc: sbhatta, hkelam, horms, bbhushan2, andrew+netdev, davem, edumazet,
sumang, netdev, linux-kernel, Bo Sun
Two small patches that free the AF_XDP bitmap in the PF and VF
remove paths. Both carry the same Fixes tag and should go to
stable.
Changes in v2:
- Add correct [PATCH net v2] subject prefix
- CC the sign-off authors that introduced the leak and everyone
returned by scripts/get_maintainer.pl
Bo Sun (2):
octeontx2-vf: fix bitmap leak
octeontx2-pf: fix bitmap leak
drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c | 1 +
drivers/net/ethernet/marvell/octeontx2/nic/otx2_vf.c | 1 +
2 files changed, 2 insertions(+)
--
2.50.1 (Apple Git-155)
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH net v2 1/2] octeontx2-vf: fix bitmap leak
2025-09-30 6:12 [PATCH net v2 0/2] octeontx2: fix bitmap leaks in PF and VF Bo Sun
@ 2025-09-30 6:12 ` Bo Sun
2025-09-30 6:12 ` [PATCH net v2 2/2] octeontx2-pf: " Bo Sun
2025-10-01 0:40 ` [PATCH net v2 0/2] octeontx2: fix bitmap leaks in PF and VF patchwork-bot+netdevbpf
2 siblings, 0 replies; 4+ messages in thread
From: Bo Sun @ 2025-09-30 6:12 UTC (permalink / raw)
To: sgoutham, gakula, kuba, pabeni
Cc: sbhatta, hkelam, horms, bbhushan2, andrew+netdev, davem, edumazet,
sumang, 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);
}
--
2.50.1 (Apple Git-155)
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH net v2 2/2] octeontx2-pf: fix bitmap leak
2025-09-30 6:12 [PATCH net v2 0/2] octeontx2: fix bitmap leaks in PF and VF Bo Sun
2025-09-30 6:12 ` [PATCH net v2 1/2] octeontx2-vf: fix bitmap leak Bo Sun
@ 2025-09-30 6:12 ` Bo Sun
2025-10-01 0:40 ` [PATCH net v2 0/2] octeontx2: fix bitmap leaks in PF and VF patchwork-bot+netdevbpf
2 siblings, 0 replies; 4+ messages in thread
From: Bo Sun @ 2025-09-30 6:12 UTC (permalink / raw)
To: sgoutham, gakula, kuba, pabeni
Cc: sbhatta, hkelam, horms, bbhushan2, andrew+netdev, davem, edumazet,
sumang, 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);
}
--
2.50.1 (Apple Git-155)
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH net v2 0/2] octeontx2: fix bitmap leaks in PF and VF
2025-09-30 6:12 [PATCH net v2 0/2] octeontx2: fix bitmap leaks in PF and VF Bo Sun
2025-09-30 6:12 ` [PATCH net v2 1/2] octeontx2-vf: fix bitmap leak Bo Sun
2025-09-30 6:12 ` [PATCH net v2 2/2] octeontx2-pf: " Bo Sun
@ 2025-10-01 0:40 ` patchwork-bot+netdevbpf
2 siblings, 0 replies; 4+ messages in thread
From: patchwork-bot+netdevbpf @ 2025-10-01 0:40 UTC (permalink / raw)
To: Bo Sun
Cc: sgoutham, gakula, kuba, pabeni, sbhatta, hkelam, horms, bbhushan2,
andrew+netdev, davem, edumazet, sumang, netdev, linux-kernel
Hello:
This series was applied to netdev/net.git (main)
by Jakub Kicinski <kuba@kernel.org>:
On Tue, 30 Sep 2025 14:12:34 +0800 you wrote:
> Two small patches that free the AF_XDP bitmap in the PF and VF
> remove paths. Both carry the same Fixes tag and should go to
> stable.
>
> Changes in v2:
> - Add correct [PATCH net v2] subject prefix
> - CC the sign-off authors that introduced the leak and everyone
> returned by scripts/get_maintainer.pl
>
> [...]
Here is the summary with links:
- [net,v2,1/2] octeontx2-vf: fix bitmap leak
https://git.kernel.org/netdev/net/c/cd9ea7da41a4
- [net,v2,2/2] octeontx2-pf: fix bitmap leak
https://git.kernel.org/netdev/net/c/92e9f4faffca
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2025-10-01 0:40 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-30 6:12 [PATCH net v2 0/2] octeontx2: fix bitmap leaks in PF and VF Bo Sun
2025-09-30 6:12 ` [PATCH net v2 1/2] octeontx2-vf: fix bitmap leak Bo Sun
2025-09-30 6:12 ` [PATCH net v2 2/2] octeontx2-pf: " Bo Sun
2025-10-01 0:40 ` [PATCH net v2 0/2] octeontx2: fix bitmap leaks in PF and VF patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).