This is a note to let you know that I've just added the patch titled scsi: mpi3mr: Fix config page DMA memory leak to the 6.2-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: scsi-mpi3mr-fix-config-page-dma-memory-leak.patch and it can be found in the queue-6.2 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. commit 1a6d54448956571357237f4012a320aefba50ee0 Author: Tomas Henzl <thenzl@xxxxxxxxxx> Date: Fri Mar 3 00:43:32 2023 +0100 scsi: mpi3mr: Fix config page DMA memory leak [ Upstream commit 7d2b02172b6a2ae6aecd7ef6480b9c4bf3dc59f4 ] A fix for: DMA-API: pci 0000:83:00.0: device driver has pending DMA allocations while released from device [count=1] Fixes: 32d457d5a2af ("scsi: mpi3mr: Add framework to issue config requests") Signed-off-by: Tomas Henzl <thenzl@xxxxxxxxxx> Link: https://lore.kernel.org/r/20230302234336.25456-3-thenzl@xxxxxxxxxx Acked-by: Sathya Prakash Veerichetty <sathya.prakash@xxxxxxxxxxxx> Signed-off-by: Martin K. Petersen <martin.petersen@xxxxxxxxxx> Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx> diff --git a/drivers/scsi/mpi3mr/mpi3mr_fw.c b/drivers/scsi/mpi3mr/mpi3mr_fw.c index 9c716d92c2564..77282ad5688da 100644 --- a/drivers/scsi/mpi3mr/mpi3mr_fw.c +++ b/drivers/scsi/mpi3mr/mpi3mr_fw.c @@ -4350,7 +4350,11 @@ void mpi3mr_free_mem(struct mpi3mr_ioc *mrioc) mrioc->admin_req_base, mrioc->admin_req_dma); mrioc->admin_req_base = NULL; } - + if (mrioc->cfg_page) { + dma_free_coherent(&mrioc->pdev->dev, mrioc->cfg_page_sz, + mrioc->cfg_page, mrioc->cfg_page_dma); + mrioc->cfg_page = NULL; + } if (mrioc->pel_seqnum_virt) { dma_free_coherent(&mrioc->pdev->dev, mrioc->pel_seqnum_sz, mrioc->pel_seqnum_virt, mrioc->pel_seqnum_dma);