From: Bart Van Assche <bvanassche@acm.org>
To: Bean Huo <huobean@gmail.com>,
alim.akhtar@samsung.com, avri.altman@wdc.com,
asutoshd@codeaurora.org, jejb@linux.ibm.com,
martin.petersen@oracle.com, stanley.chu@mediatek.com,
beanhuo@micron.com, tomas.winkler@intel.com, cang@codeaurora.org,
daejun7.park@samsung.com
Cc: linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 1/2] scsi: ufs: core: Remove unnecessary if statement
Date: Fri, 14 Oct 2022 13:45:41 -0700 [thread overview]
Message-ID: <16bee8e7-a9ec-0847-9d89-92484b0399a0@acm.org> (raw)
In-Reply-To: <227f117ee9491cc9d2ae4bb2211a99ccd1dd3c21.camel@gmail.com>
On 10/14/22 13:30, Bean Huo wrote:
> I double-checked the changelog and the stack overflow issue was double
> fixed by your commit:
>
> commit d3d9c4570285 ("scsi: ufs: Fix memory corruption by
> ufshcd_read_desc_param()"),
>
> For example, if the user wants to read wb_buf_alloc_units in the RPMB
> unit descriptor,
>
> parameter offset = 41, parameter size = 4,
> buff_len = 45;
>
> After ufshcd_query_descriptor_retry(), buff_len will be updated to 35.
>
> param_offset > buff_len, then -EINVAL will be returned.
>
> So we can safely remove this check, and if you still have concerns, I
> can verify when I get back to the office.
Hi Bean,
Thank you for having looked this up. I agree with the above.
Bart.
next prev parent reply other threads:[~2022-10-14 20:45 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-10 9:29 [PATCH v2 0/2] Changes for ufshcd.c Bean Huo
2022-10-10 9:29 ` [PATCH v2 1/2] scsi: ufs: core: Remove unnecessary if statement Bean Huo
2022-10-11 2:21 ` Daejun Park
2022-10-11 9:39 ` Bean Huo
2022-10-14 0:19 ` Daejun Park
2022-10-14 18:37 ` Bart Van Assche
2022-10-14 19:20 ` Bean Huo
2022-10-14 20:41 ` Bart Van Assche
2022-10-14 20:57 ` Bean Huo
2022-10-14 20:30 ` Bean Huo
2022-10-14 20:45 ` Bart Van Assche [this message]
2022-10-10 9:29 ` [PATCH v2 2/2] scsi: ufs: core: Cleanup ufshcd_slave_alloc() Bean Huo
2022-10-14 21:05 ` Bart Van Assche
2022-10-17 16:56 ` Bean Huo
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=16bee8e7-a9ec-0847-9d89-92484b0399a0@acm.org \
--to=bvanassche@acm.org \
--cc=alim.akhtar@samsung.com \
--cc=asutoshd@codeaurora.org \
--cc=avri.altman@wdc.com \
--cc=beanhuo@micron.com \
--cc=cang@codeaurora.org \
--cc=daejun7.park@samsung.com \
--cc=huobean@gmail.com \
--cc=jejb@linux.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=stanley.chu@mediatek.com \
--cc=tomas.winkler@intel.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