]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
bnx2x: fix pf2vf bulletin DMA mapping leak
authorMichal Schmidt <mschmidt@redhat.com>
Tue, 6 Jun 2017 14:30:31 +0000 (16:30 +0200)
committerSomasundaram Krishnasamy <somasundaram.krishnasamy@oracle.com>
Fri, 14 Jul 2017 17:54:45 +0000 (10:54 -0700)
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.

Orabug: 26440216

Signed-off-by: Michal Schmidt <mschmidt@redhat.com>
Acked-by: Yuval Mintz <Yuval.Mintz@cavium.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit 996652c7050c70008e4434af108be6f15f20fbd0)
Signed-off-by: Somasundaram Krishnasamy <somasundaram.krishnasamy@oracle.com>
Reviewed-by: Jack Vogel <jack.vogel@oracle.com>
drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c

index 9e8dd05f746ed9547ffdf857676ce8ed6233aa09..40db98d9af374db8f884a96ab6a4cd9a3f0830e2 100644 (file)
@@ -3037,7 +3037,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));
 }