New: wrong timeout calculation in scsi device_handler (scsi_dh_emc.c and scsi_dh_rdac.c)
https://bugzilla.kernel.org/show_bug.cgi?id=212007
Bug ID: 212007
Summary: wrong timeout calculation in scsi device_handler
(scsi_dh_emc.c and scsi_dh_rdac.c)
Product: SCSI Drivers
Version: 2.5
Kernel Version: 5.11.2 (all kernels since 4.11)
Hardware: All
OS: Linux
Tree: Mainline
Status: NEW
Severity: normal
Priority: P1
Component: Other
Assignee: [email protected]
Reporter: [email protected]
Regression: No
Created attachment 295549
--> https://bugzilla.kernel.org/attachment.cgi?id=295549&action=edit
patch to correct wrong timeout calculations in scsi device handler
scsi_dh_emc.c:
--------------
In scsi_dh_emc.c (line 34) CLARIION_TIMEOUT ist defined as (60 * HZ).
In send_trespass_cmd (lines 279 - 281) the following is calculated:
err = scsi_execute(sdev, cdb, DMA_TO_DEVICE, csdev->buffer, len, NULL,
&sshdr, CLARIION_TIMEOUT * HZ, CLARIION_RETRIES, req_flags, 0, NULL);
The result is "(60 * HZ) * HZ".
scsi_dh_rdac.c:
---------------
In scsi_dh_rdac.c (line 55) RDAC_TIMEOUT is defined as (60 * HZ).
In send_mode_select (lines 558 - 566) the following is calculated:
if (scsi_execute(sdev, cdb, DMA_TO_DEVICE, &h->ctlr->mode_select,
data_size, NULL, &sshdr, RDAC_TIMEOUT * HZ,
RDAC_RETRIES, req_flags, 0, NULL)) {
err = mode_select_handle_sense(sdev, &sshdr);
if (err == SCSI_DH_RETRY && retry_cnt--)
goto retry;
if (err == SCSI_DH_IMM_RETRY)
goto retry;
}The result is "(60 * HZ) * HZ".
Signature · 4 lines
You may reply to this email to add a comment. You are receiving this mail because: You are watching the assignee of the bug.
[Bug 212007] wrong timeout calculation in scsi device_handler (scsi_dh_emc.c and scsi_dh_rdac.c)
https://bugzilla.kernel.org/show_bug.cgi?id=212007
Bart Van Assche ([email protected]) changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |[email protected]
--- Comment #1 from Bart Van Assche ([email protected]) --- Please prepare a patch and post it on the linux-scsi mailing list.
Signature · 4 lines
You may reply to this email to add a comment. You are receiving this mail because: You are watching the assignee of the bug.