From: "zhengbin (A)" <zhengbin13@huawei.com>
To: James Bottomley <jejb@linux.ibm.com>, <bvanassche@acm.org>,
<martin.petersen@oracle.com>, <linux-scsi@vger.kernel.org>
Subject: Re: [PATCH v2] scsi: core: fix uninit-value access of variable sshdr
Date: Sat, 12 Oct 2019 10:10:26 +0800 [thread overview]
Message-ID: <f99ef947-080a-b2ff-e43e-66a0a69fa304@huawei.com> (raw)
In-Reply-To: <1570845968.17735.28.camel@linux.ibm.com>
On 2019/10/12 10:06, James Bottomley wrote:
> On Sat, 2019-10-12 at 10:03 +0800, zhengbin (A) wrote:
>> On 2019/10/12 9:58, James Bottomley wrote:
>>> On Sat, 2019-10-12 at 09:26 +0800, zhengbin wrote:
>>>> BTW: we can't just init sshdr->response_code, sr_do_ioctl use
>>>> sshdr->sense_key
>>> That's an actual bug, isn't it?
>> If we init sshdr in __scsi_execute, this will be ok
> No I mean it's a bug because sr_do_ioctl shouldn't be acting on sense
> that isn't valid. So all uses of sshdr should be gated on a validity
> check.
Yes you are right, the right way is use scsi_sense_valid(&sshdr), I have troubleshoot callers,
this is the only wrong use(Maybe I miss some...).
>
> James
>
>
> .
>
prev parent reply other threads:[~2019-10-12 2:10 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-12 1:26 [PATCH v2] scsi: core: fix uninit-value access of variable sshdr zhengbin
2019-10-12 1:58 ` James Bottomley
2019-10-12 2:03 ` zhengbin (A)
2019-10-12 2:06 ` James Bottomley
2019-10-12 2:10 ` zhengbin (A) [this message]
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=f99ef947-080a-b2ff-e43e-66a0a69fa304@huawei.com \
--to=zhengbin13@huawei.com \
--cc=bvanassche@acm.org \
--cc=jejb@linux.ibm.com \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.