Thread (34 messages) 34 messages, 2 authors, 2021-03-11
STALE1947d REVIEWED: 3 (0M)
Revisions (22)
  1. v1 [diff vs current]
  2. v1 [diff vs current]
  3. v2 [diff vs current]
  4. v3 [diff vs current]
  5. v4 current
  6. v5 [diff vs current]
  7. v1 [diff vs current]
  8. v2 [diff vs current]
  9. v3 [diff vs current]
  10. v1 [diff vs current]
  11. v2 [diff vs current]
  12. v1 [diff vs current]
  13. v2 [diff vs current]
  14. v1 [diff vs current]
  15. v1 [diff vs current]
  16. v1 [diff vs current]
  17. v2 [diff vs current]
  18. v1 [diff vs current]
  19. v1 [diff vs current]
  20. v1 [diff vs current]
  21. v1 [diff vs current]
  22. v1 [diff vs current]

[PATCH V4 02/31] smartpqi: fix request leakage

From: Don Brace <don.brace@microchip.com>
Date: 2021-03-10 20:01:51
Subsystem: microsemi smart array smartpqi driver (smartpqi), scsi subsystem, the rest · Maintainers: Don Brace, "James E.J. Bottomley", "Martin K. Petersen", Linus Torvalds

From: Murthy Bhat <redacted>

Correct request leakage during reset operations.
 * While failing queued IOs in TMF path, there was a request
   leak and hence stale entries in request pool with ref
   count being nonzero. In shutdown path, we have a BUG_ON
   to catch stuck IO either in f/w or in the driver.

   The stale requests caused a system crash.
   The IO request pool leakage also lead to a significant
   performance drop.

Reviewed-by: Scott Teel <redacted>
Reviewed-by: Scott Benesh <redacted>
Reviewed-by: Kevin Barnett <redacted>
Signed-off-by: Murthy Bhat <redacted>
Signed-off-by: Don Brace <don.brace@microchip.com>
---
 drivers/scsi/smartpqi/smartpqi_init.c |    4 ++++
 1 file changed, 4 insertions(+)
diff --git a/drivers/scsi/smartpqi/smartpqi_init.c b/drivers/scsi/smartpqi/smartpqi_init.c
index c154e4578e55..2886884ad584 100644
--- a/drivers/scsi/smartpqi/smartpqi_init.c
+++ b/drivers/scsi/smartpqi/smartpqi_init.c
@@ -5489,6 +5489,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);
 			}
 
@@ -5525,6 +5527,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);
 			}
 
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help