Re: [PATCH] scsi: mpt3sas: fix NULL pointer access in mpt3sas_transport_port_add()

Martin K. Petersen
2023-03-10T03:10:03Z

On Sat, 25 Feb 2023 18:01:36 +0800, Wenchao Hao wrote:

> port is allocated by sas_port_alloc_num() and rphy is allocated by
> sas_end_device_alloc() or sas_expander_alloc() which may return NULL,
> so we need to check the rphy to avoid possible NULL pointer access.
>
> If sas_rphy_add() called with failure rphy is set to NULL, we would
> access the rphy in next lines which would also result NULL pointer
> access.
>
> [...]

Applied to 6.3/scsi-fixes, thanks!

[1/1] scsi: mpt3sas: fix NULL pointer access in mpt3sas_transport_port_add()
https://git.kernel.org/mkp/scsi/c/d3c57724f156

--
Martin K. Petersen Oracle Linux Engineering