bnx2x: fix pf2vf bulletin DMA mapping leak
PATCH 1/1 bnx2x: fix pf2vf bulletin DMA mapping leak
When freeing VF's DMA mappings, an already NULLed pointer was checked again due to an apparent copy&paste error. Consequently, the pf2vf bulletin DMA mapping was not freed.
Signed-off-by Michal Schmidt <[email protected]>
--- drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c +1 -1
@@ -3042,7 +3042,7 @@ void bnx2x_vf_pci_dealloc(struct bnx2x *bp) {BNX2X_PCI_FREE (bp->vf2pf_mbox, bp->vf2pf_mbox_mapping,sizeof (struct bnx2x_vf_mbx_msg )); -BNX2X_PCI_FREE (bp->vf2pf_mbox, bp->pf2vf_bulletin_mapping, +BNX2X_PCI_FREE (bp->pf2vf_bulletin, bp->pf2vf_bulletin_mapping,sizeof (union pf_vf_bulletin )); }
Signature · 1 line
2.13.0
Quoted 5 lines
When freeing VF's DMA mappings, an already NULLed pointer was checked again due to an apparent copy&paste error. Consequently, the pf2vf bulletin DMA mapping was not freed.
Signed-off-by Michal Schmidt <[email protected]>
Thanks Michal.
Acked-by Yuval Mintz <[email protected]>
From: Michal Schmidt <[email protected]>
Date: Tue, 6 Jun 2017 16:30:31 +0200
Quoted 5 lines
When freeing VF's DMA mappings, an already NULLed pointer was checked again due to an apparent copy&paste error. Consequently, the pf2vf bulletin DMA mapping was not freed.
Signed-off-by Michal Schmidt <[email protected]>
Applied, thank you.