Thread (112 messages) flat view 112 messages, 5 authors, 22h ago

Re: [PATCH v5 22/40] scsi: myrX: use 16-bits defined sense codes

From: sashiko-bot@kernel.org
Date: 2026-09-07 02:59:53
Also in: linux-s390, linux-scsi

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:

Pre-existing issues:
- [High] The REQUEST_SENSE command handler in myrb_ldev_queuecommand completes the command locally but fails to call scsi_done(scmd), leading to a command timeout.
--

commit 8ca552cf50170727d9d9b758f842364f75a74d16
Author: Damien Le Moal [off-list ref]

scsi: myrX: use 16-bits defined sense codes

This patch refactors the Mylex RAID controller driver to use
scsi_set_sense() and 16-bit sense codes from include/scsi/scsi_sense.h
instead of hard-coded values.
quoted hunk ↗ jump to hunk
diff --git a/drivers/scsi/myrb.c b/drivers/scsi/myrb.c
index 3678b66310ed0..e7d796add9864 100644
--- a/drivers/scsi/myrb.c
+++ b/drivers/scsi/myrb.c
[ ... ]
quoted hunk ↗ jump to hunk
@@ -1493,8 +1495,8 @@ static enum scsi_qc_status myrb_ldev_queuecommand(struct Scsi_Host *shost,
 		return 0;
[Severity: High]
This is a pre-existing issue, but I noticed a potential problem in how
the REQUEST_SENSE command is handled in myrb_ldev_queuecommand() in
drivers/scsi/myrb.c.

When handling REQUEST_SENSE, the driver executes the command locally:

	case REQUEST_SENSE:
		myrb_request_sense(cb, scmd);
		scmd->result = (DID_OK << 16);
		return 0;

However, it returns 0 without calling scsi_done(scmd).

Because the SCSI midlayer expects local command completions to invoke
scsi_done(), will this omission cause the command to stall until a timeout
occurs?

If an application issues a REQUEST_SENSE command via the SG_IO interface
to a logical drive, could this trigger the SCSI error handler and lead to
resets that disrupt system I/O?

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260907024343.1046387-1-dlemoal@kernel.org?part=22
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help