Skip to content

Commit 7d2b021

Browse files
thenzlmartinkpetersen
authored andcommitted
scsi: mpi3mr: Fix config page DMA memory leak
A fix for: DMA-API: pci 0000:83:00.0: device driver has pending DMA allocations while released from device [count=1] Fixes: 32d457d ("scsi: mpi3mr: Add framework to issue config requests") Signed-off-by: Tomas Henzl <[email protected]> Link: https://lore.kernel.org/r/[email protected] Acked-by: Sathya Prakash Veerichetty <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
1 parent f305a7b commit 7d2b021

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

drivers/scsi/mpi3mr/mpi3mr_fw.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4382,7 +4382,11 @@ void mpi3mr_free_mem(struct mpi3mr_ioc *mrioc)
43824382
mrioc->admin_req_base, mrioc->admin_req_dma);
43834383
mrioc->admin_req_base = NULL;
43844384
}
4385-
4385+
if (mrioc->cfg_page) {
4386+
dma_free_coherent(&mrioc->pdev->dev, mrioc->cfg_page_sz,
4387+
mrioc->cfg_page, mrioc->cfg_page_dma);
4388+
mrioc->cfg_page = NULL;
4389+
}
43864390
if (mrioc->pel_seqnum_virt) {
43874391
dma_free_coherent(&mrioc->pdev->dev, mrioc->pel_seqnum_sz,
43884392
mrioc->pel_seqnum_virt, mrioc->pel_seqnum_dma);

0 commit comments

Comments
 (0)