diff mbox

[net] bnx2x: fix pf2vf bulletin DMA mapping leak

Message ID 20170606143031.863-1-mschmidt@redhat.com
State Accepted, archived
Delegated to: David Miller
Headers show

Commit Message

Michal Schmidt June 6, 2017, 2:30 p.m. UTC
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 <mschmidt@redhat.com>
---
 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Mintz, Yuval June 7, 2017, 2:23 p.m. UTC | #1
> 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 <mschmidt@redhat.com>

Thanks Michal.

Acked-by: Yuval Mintz <Yuval.Mintz@cavium.com>
David Miller June 7, 2017, 5 p.m. UTC | #2
From: Michal Schmidt <mschmidt@redhat.com>
Date: Tue,  6 Jun 2017 16:30:31 +0200

> 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 <mschmidt@redhat.com>

Applied, thank you.
diff mbox

Patch

diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c
index bdfd53b46b..870ea001a7 100644
--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c
+++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c
@@ -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));
 }