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

From: Sathya Prakash Veerichetty
Date: Tue Mar 07 2023 - 11:56:04 EST


On Mon, Mar 6, 2023 at 6:42 PM Martin K. Petersen
<martin.petersen@xxxxxxxxxx> wrote:
>
>
> Ranjan/Sreekanth,
>
> > 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.
> >
> > Fix commit 78316e9dfc24 ("scsi: mpt3sas: Fix possible resource leaks
> > in mpt3sas_transport_port_add()")
>
> Please review!
Looks good to me, please commit it for the 6.3 scsi_fixes

>
> --
> Martin K. Petersen Oracle Linux Engineering

--
This electronic communication and the information and any files transmitted
with it, or attached to it, are confidential and are intended solely for
the use of the individual or entity to whom it is addressed and may contain
information that is confidential, legally privileged, protected by privacy
laws, or otherwise restricted from disclosure to anyone else. If you are
not the intended recipient or the person responsible for delivering the
e-mail to the intended recipient, you are hereby notified that any use,
copying, distributing, dissemination, forwarding, printing, or copying of
this e-mail is strictly prohibited. If you received this e-mail in error,
please return the e-mail to the sender, delete it from your computer, and
destroy any printed copy of it.

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature