From: "Martin K. Petersen" <martin.petersen@oracle.com>
To: zhengbin <zhengbin13@huawei.com>
Cc: <bvanassche@acm.org>, <jejb@linux.ibm.com>,
<linux-scsi@vger.kernel.org>, <yi.zhang@huawei.com>
Subject: Re: [PATCH v4 1/2] sr: need to check whether sshdr is valid in sr_do_ioctl
Date: Thu, 17 Oct 2019 22:38:51 -0400 [thread overview]
Message-ID: <yq136fqkcas.fsf@oracle.com> (raw)
In-Reply-To: <yq1a79ykdjh.fsf@oracle.com> (Martin K. Petersen's message of "Thu, 17 Oct 2019 22:12:02 -0400")
zhengbin,
>> Like other callers of scsi_execute(send_trespass_cmd, hp_sw_tur...),
>> we need to check whether sshdr is valid.
>
> Applied to 5.4/scsi-fixes, thanks!
Actually, after looking at this again, the function is making the
assumption that if driver_byte(result) != 0, then the sense is
present. It really should check both driver_byte(result) == DRIVER_SENSE
and scsi_sense_valid(sshdr) before poking at the sense data.
--
Martin K. Petersen Oracle Linux Engineering
next prev parent reply other threads:[~2019-10-18 5:50 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-17 6:19 [PATCH v4 0/2] scsi: core: fix uninit-value access of variable sshdr zhengbin
2019-10-17 6:19 ` [PATCH v4 1/2] sr: need to check whether sshdr is valid in sr_do_ioctl zhengbin
2019-10-18 2:12 ` Martin K. Petersen
2019-10-18 2:38 ` Martin K. Petersen [this message]
2019-10-17 6:19 ` [PATCH v4 2/2] scsi: core: fix uninit-value access of variable sshdr zhengbin
2019-10-18 2:40 ` Martin K. Petersen
2019-10-18 2:46 ` zhengbin (A)
2019-10-18 2:50 ` 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=yq136fqkcas.fsf@oracle.com \
--to=martin.petersen@oracle.com \
--cc=bvanassche@acm.org \
--cc=jejb@linux.ibm.com \
--cc=linux-scsi@vger.kernel.org \
--cc=yi.zhang@huawei.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.