Skip to content

Commit 92e9f4f

Browse files
Bo Sunkuba-moo
authored andcommitted
octeontx2-pf: fix bitmap leak
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: efabce2 ("octeontx2-pf: AF_XDP zero copy receive support") Signed-off-by: Bo Sun <[email protected]> Signed-off-by: Jakub Kicinski <[email protected]>
1 parent cd9ea7d commit 92e9f4f

File tree

1 file changed

+1
-0
lines changed
  • drivers/net/ethernet/marvell/octeontx2/nic

1 file changed

+1
-0
lines changed

drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3542,6 +3542,7 @@ static void otx2_remove(struct pci_dev *pdev)
35423542
otx2_disable_mbox_intr(pf);
35433543
otx2_pfaf_mbox_destroy(pf);
35443544
pci_free_irq_vectors(pf->pdev);
3545+
bitmap_free(pf->af_xdp_zc_qidx);
35453546
pci_set_drvdata(pdev, NULL);
35463547
free_netdev(netdev);
35473548
}

0 commit comments

Comments
 (0)