mirror of
https://github.com/torvalds/linux.git
synced 2026-06-02 19:43:40 +02:00
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 <scott.benesh@microchip.com> Reviewed-by: Scott Teel <scott.teel@microchip.com> Reviewed-by: Mike McGowen <mike.mcgowen@microchip.com> Reviewed-by: Kevin Barnett <kevin.barnett@microchip.com> Signed-off-by: Murthy Bhat <Murthy.Bhat@microchip.com> Signed-off-by: Don Brace <don.brace@microchip.com> Link: https://lore.kernel.org/r/20230428153712.297638-7-don.brace@microchip.com Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:
parent
80d560d94f
commit
5c9e3c1c52
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user