From: Bart Van Assche <bvanassche@acm.org>
To: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>,
James.Bottomley@HansenPartnership.com
Cc: martin.petersen@oracle.com, linux-scsi@vger.kernel.org,
linux-kernel@vger.kernel.org,
Abaci Robot <abaci@linux.alibaba.com>
Subject: Re: [PATCH] scsi: sd: Fix unsigned expression compared with zero
Date: Mon, 1 Jul 2024 10:08:34 -0700 [thread overview]
Message-ID: <f3e253f5-ece4-4ffe-9112-cd763a0f1ce5@acm.org> (raw)
In-Reply-To: <20240701090603.127783-1-jiapeng.chong@linux.alibaba.com>
On 7/1/24 2:06 AM, Jiapeng Chong wrote:
> The return value from the call to scsi_execute_cmd() is int. However, the
> return value is being assigned to an unsigned int variable 'the_result',
> so making 'the_result' an int.
Please explain the full effect of this patch in the patch description. I
think this patch causes a potential read of uninitialized data (sshdr)
to be skipped if scsi_execute_cmd() returns a negative value. Do you
agree with this?
Thanks,
Bart.
next prev parent reply other threads:[~2024-07-01 17:08 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-01 9:06 [PATCH] scsi: sd: Fix unsigned expression compared with zero Jiapeng Chong
2024-07-01 16:50 ` Bart Van Assche
2024-07-01 17:08 ` Bart Van Assche [this message]
2024-07-02 9:44 ` John Garry
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=f3e253f5-ece4-4ffe-9112-cd763a0f1ce5@acm.org \
--to=bvanassche@acm.org \
--cc=James.Bottomley@HansenPartnership.com \
--cc=abaci@linux.alibaba.com \
--cc=jiapeng.chong@linux.alibaba.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.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