Patch "scsi: smartpqi: Correct request leakage during reset operations" has been added to the 5.10-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    scsi: smartpqi: Correct request leakage during reset operations

to the 5.10-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-smartpqi-correct-request-leakage-during-reset-o.patch
and it can be found in the queue-5.10 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 58f70a374486c809f85ac8090a0918684c9dd761
Author: Murthy Bhat <Murthy.Bhat@xxxxxxxxxxxxx>
Date:   Thu Mar 11 14:15:03 2021 -0600

    scsi: smartpqi: Correct request leakage during reset operations
    
    [ Upstream commit b622a601a13ae5974c5b0aeecb990c224b8db0d9 ]
    
    While failing queued I/Os in TMF path, there was a request leak and hence
    stale entries in request pool with ref count being non-zero. In shutdown
    path we have a BUG_ON to catch stuck I/O either in firmware or in the
    driver. The stale requests caused a system crash. The I/O request pool
    leakage also lead to a significant performance drop.
    
    Link: https://lore.kernel.org/r/161549370379.25025.12793264112620796062.stgit@brunhilda
    Reviewed-by: Scott Teel <scott.teel@xxxxxxxxxxxxx>
    Reviewed-by: Scott Benesh <scott.benesh@xxxxxxxxxxxxx>
    Reviewed-by: Kevin Barnett <kevin.barnett@xxxxxxxxxxxxx>
    Signed-off-by: Murthy Bhat <Murthy.Bhat@xxxxxxxxxxxxx>
    Signed-off-by: Don Brace <don.brace@xxxxxxxxxxxxx>
    Signed-off-by: Martin K. Petersen <martin.petersen@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/scsi/smartpqi/smartpqi_init.c b/drivers/scsi/smartpqi/smartpqi_init.c
index 9300a677510d..afd004fdce76 100644
--- a/drivers/scsi/smartpqi/smartpqi_init.c
+++ b/drivers/scsi/smartpqi/smartpqi_init.c
@@ -5491,6 +5491,8 @@ static void pqi_fail_io_queued_for_device(struct pqi_ctrl_info *ctrl_info,
 
 				list_del(&io_request->request_list_entry);
 				set_host_byte(scmd, DID_RESET);
+				pqi_free_io_request(io_request);
+				scsi_dma_unmap(scmd);
 				pqi_scsi_done(scmd);
 			}
 
@@ -5527,6 +5529,8 @@ static void pqi_fail_io_queued_for_all_devices(struct pqi_ctrl_info *ctrl_info)
 
 				list_del(&io_request->request_list_entry);
 				set_host_byte(scmd, DID_RESET);
+				pqi_free_io_request(io_request);
+				scsi_dma_unmap(scmd);
 				pqi_scsi_done(scmd);
 			}
 



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux