From: "Martin K. Petersen" <martin.petersen@oracle.com>
To: Ranjan Kumar <ranjan.kumar@broadcom.com>,
Sreekanth Reddy <sreekanth.reddy@broadcom.com>
Cc: Wenchao Hao <haowenchao2@huawei.com>,
Sathya Prakash <sathya.prakash@broadcom.com>,
Suganath Prabu Subramani <suganath-prabu.subramani@broadcom.com>,
"James E . J . Bottomley" <jejb@linux.ibm.com>,
"Martin K . Petersen" <martin.petersen@oracle.com>,
<MPT-FusionLinux.pdl@broadcom.com>, <linux-scsi@vger.kernel.org>,
<linux-kernel@vger.kernel.org>, <linfeilong@huawei.com>
Subject: Re: [PATCH] scsi: mpt3sas: fix NULL pointer access in mpt3sas_transport_port_add()
Date: Mon, 06 Mar 2023 20:42:14 -0500 [thread overview]
Message-ID: <yq1mt4pmj8g.fsf@ca-mkp.ca.oracle.com> (raw)
In-Reply-To: <20230225100135.2109330-1-haowenchao2@huawei.com> (Wenchao Hao's message of "Sat, 25 Feb 2023 18:01:36 +0800")
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!
--
Martin K. Petersen Oracle Linux Engineering
next prev parent reply other threads:[~2023-03-07 1:42 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-25 10:01 [PATCH] scsi: mpt3sas: fix NULL pointer access in mpt3sas_transport_port_add() Wenchao Hao
2023-02-28 14:49 ` haowenchao (C)
2023-03-07 1:42 ` Martin K. Petersen [this message]
2023-03-07 16:51 ` Sathya Prakash Veerichetty
2023-03-07 16:53 ` Sathya Prakash Veerichetty
2023-03-10 3:09 ` Martin K. Petersen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=yq1mt4pmj8g.fsf@ca-mkp.ca.oracle.com \
--to=martin.petersen@oracle.com \
--cc=MPT-FusionLinux.pdl@broadcom.com \
--cc=haowenchao2@huawei.com \
--cc=jejb@linux.ibm.com \
--cc=linfeilong@huawei.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=ranjan.kumar@broadcom.com \
--cc=sathya.prakash@broadcom.com \
--cc=sreekanth.reddy@broadcom.com \
--cc=suganath-prabu.subramani@broadcom.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox