All of lore.kernel.org
 help / color / mirror / Atom feed
From: James Bottomley <jejb@linux.ibm.com>
To: "zhengbin (A)" <zhengbin13@huawei.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: Fri, 11 Oct 2019 19:06:08 -0700	[thread overview]
Message-ID: <1570845968.17735.28.camel@linux.ibm.com> (raw)
In-Reply-To: <783b66dc-e7e9-3780-3041-7ab03491def5@huawei.com>

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.

James


  reply	other threads:[~2019-10-12  2:06 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 [this message]
2019-10-12  2:10       ` zhengbin (A)

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=1570845968.17735.28.camel@linux.ibm.com \
    --to=jejb@linux.ibm.com \
    --cc=bvanassche@acm.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=zhengbin13@huawei.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.