From: Damien Le Moal <dlemoal@kernel.org>
To: Yang Xiuwei <yangxiuwei@kylinos.cn>,
martin.petersen@oracle.com,
James.Bottomley@HansenPartnership.com
Cc: hare@suse.de, tom.leiming@gmail.com, p.raghav@samsung.com,
sw.prabhu6@gmail.com, linux-scsi@vger.kernel.org
Subject: Re: [PATCH v1 4/4] scsi: sd: fix sd_done() sense handling condition
Date: Sat, 27 Jun 2026 07:07:06 +0900 [thread overview]
Message-ID: <e0b5579a-8626-4178-a838-4dd7ab875ce3@kernel.org> (raw)
In-Reply-To: <20260623100159.4018066-5-yangxiuwei@kylinos.cn>
On 6/23/26 19:01, Yang Xiuwei wrote:
> Commit 464a00c9e0ad ("scsi: core: Kill DRIVER_SENSE") replaced
> driver_byte(result) != DRIVER_SENSE with
> !scsi_status_is_check_condition(result) but kept the old OR-shaped
> gate. That lets CHECK CONDITION with invalid or deferred sense enter
> the sense_key switch with an uninitialized or stale sshdr.
>
> Only handle sshdr when CHECK CONDITION is indicated and the sense
> data is valid and not deferred.
>
> Fixes: 464a00c9e0ad ("scsi: core: Kill DRIVER_SENSE")
> Signed-off-by: Yang Xiuwei <yangxiuwei@kylinos.cn>
I think the fixes tag may be wrong, since the driver_byte(result) !=
DRIVER_SENSE test was actually equivalent to
!scsi_status_is_check_condition(result). So it looks like the problem actually
is even older than 464a00c9e0ad.
But I think this is fine.
Reviewed-by: Damien Le Moal <dlemoal@kernel.org>
--
Damien Le Moal
Western Digital Research
prev parent reply other threads:[~2026-06-26 22:07 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-23 10:01 [PATCH v1 0/4] scsi: sd: fix probe error cleanup, special_vec leak and sd_done() sense gate Yang Xiuwei
2026-06-23 10:01 ` [PATCH v1 1/4] scsi: sd: fix error handling in sd_probe() after large pool creation failure Yang Xiuwei
2026-06-26 21:52 ` Damien Le Moal
2026-06-23 10:01 ` [PATCH v1 2/4] scsi: sd: unify sd_probe() error cleanup through out_put Yang Xiuwei
2026-06-26 21:54 ` Damien Le Moal
2026-06-29 1:16 ` Yang Xiuwei
2026-06-29 5:03 ` Damien Le Moal
2026-06-23 10:01 ` [PATCH v1 3/4] scsi: sd: fix special_vec mempool leak when scsi_alloc_sgtables() fails Yang Xiuwei
2026-06-23 10:20 ` sashiko-bot
2026-06-26 21:57 ` Damien Le Moal
2026-06-23 10:01 ` [PATCH v1 4/4] scsi: sd: fix sd_done() sense handling condition Yang Xiuwei
2026-06-23 10:18 ` sashiko-bot
2026-06-26 22:07 ` Damien Le Moal [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=e0b5579a-8626-4178-a838-4dd7ab875ce3@kernel.org \
--to=dlemoal@kernel.org \
--cc=James.Bottomley@HansenPartnership.com \
--cc=hare@suse.de \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=p.raghav@samsung.com \
--cc=sw.prabhu6@gmail.com \
--cc=tom.leiming@gmail.com \
--cc=yangxiuwei@kylinos.cn \
/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