summaryrefslogtreecommitdiff
path: root/drivers/scsi/mpi3mr
diff options
context:
space:
mode:
authorRanjan Kumar <ranjan.kumar@broadcom.com>2023-03-16 16:32:03 +0530
committerMartin K. Petersen <martin.petersen@oracle.com>2023-03-16 23:54:28 -0400
commit23b3d1cf157299d4786e7fd0f5888beb47ce86d1 (patch)
tree2c8a39e721fd241a15a3b426e6b155120710933d /drivers/scsi/mpi3mr
parent3f1254ed01d0860d72eead408b4fb0f38858219e (diff)
downloadlwn-23b3d1cf157299d4786e7fd0f5888beb47ce86d1.tar.gz
lwn-23b3d1cf157299d4786e7fd0f5888beb47ce86d1.zip
scsi: mpi3mr: Fix admin queue memory leak upon soft reset
After a soft reset, while setting up admin queue pairs, the driver initially sets admin request base and admin reply base addresses to NULL. This leads to DMA memory pointed by these pointers getting leaked. Signed-off-by: Ranjan Kumar <ranjan.kumar@broadcom.com> Signed-off-by: Sreekanth Reddy <sreekanth.reddy@broadcom.com> Link: https://lore.kernel.org/r/20230316110209.60145-3-ranjan.kumar@broadcom.com Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/mpi3mr')
-rw-r--r--drivers/scsi/mpi3mr/mpi3mr_fw.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/drivers/scsi/mpi3mr/mpi3mr_fw.c b/drivers/scsi/mpi3mr/mpi3mr_fw.c
index 758f7ca9e0ee..25ac3bc597f5 100644
--- a/drivers/scsi/mpi3mr/mpi3mr_fw.c
+++ b/drivers/scsi/mpi3mr/mpi3mr_fw.c
@@ -2597,14 +2597,12 @@ static int mpi3mr_setup_admin_qpair(struct mpi3mr_ioc *mrioc)
mrioc->num_admin_req = mrioc->admin_req_q_sz /
MPI3MR_ADMIN_REQ_FRAME_SZ;
mrioc->admin_req_ci = mrioc->admin_req_pi = 0;
- mrioc->admin_req_base = NULL;
mrioc->admin_reply_q_sz = MPI3MR_ADMIN_REPLY_Q_SIZE;
mrioc->num_admin_replies = mrioc->admin_reply_q_sz /
MPI3MR_ADMIN_REPLY_FRAME_SZ;
mrioc->admin_reply_ci = 0;
mrioc->admin_reply_ephase = 1;
- mrioc->admin_reply_base = NULL;
if (!mrioc->admin_req_base) {
mrioc->admin_req_base = dma_alloc_coherent(&mrioc->pdev->dev,