aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMurthy Bhat <[email protected]>2023-04-28 10:37:06 -0500
committerMartin K. Petersen <[email protected]>2023-05-08 07:17:11 -0400
commit5c9e3c1c5276cf1f0de47f97eddf48ae1e7fd083 (patch)
treecfb50c29e7a7e1f428ada13c2e6897f033f85b0d
parent80d560d94fa9b28069c62e1a64ae4a03d5f43fbc (diff)
scsi: smartpqi: Validate block layer host tag
Prevent OS crashes when a drive is hot removed during I/O stress test. The I/O request pointer can be invalid if block layer provides incorrect multi-queue host tag. This can lead to invalid I/O request pointer dereference. Reviewed-by: Scott Benesh <[email protected]> Reviewed-by: Scott Teel <[email protected]> Reviewed-by: Mike McGowen <[email protected]> Reviewed-by: Kevin Barnett <[email protected]> Signed-off-by: Murthy Bhat <[email protected]> Signed-off-by: Don Brace <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Martin K. Petersen <[email protected]>
-rw-r--r--drivers/scsi/smartpqi/smartpqi_init.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/scsi/smartpqi/smartpqi_init.c b/drivers/scsi/smartpqi/smartpqi_init.c
index 7fe80bef1a15..f76b5a3e0fd1 100644
--- a/drivers/scsi/smartpqi/smartpqi_init.c
+++ b/drivers/scsi/smartpqi/smartpqi_init.c
@@ -708,7 +708,8 @@ static inline struct pqi_io_request *pqi_alloc_io_request(struct pqi_ctrl_info *
}
}
- pqi_reinit_io_request(io_request);
+ if (io_request)
+ pqi_reinit_io_request(io_request);
return io_request;
}