Skip to content

Commit cd9ea7d

Browse files
Bo Sunkuba-moo
authored andcommitted
octeontx2-vf: fix bitmap leak
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: 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 2aff442 commit cd9ea7d

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_vf.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -854,6 +854,7 @@ static void otx2vf_remove(struct pci_dev *pdev)
854854
qmem_free(vf->dev, vf->dync_lmt);
855855
otx2vf_vfaf_mbox_destroy(vf);
856856
pci_free_irq_vectors(vf->pdev);
857+
bitmap_free(vf->af_xdp_zc_qidx);
857858
pci_set_drvdata(pdev, NULL);
858859
free_netdev(netdev);
859860
}

0 commit comments

Comments
 (0)