From: Jeff Garzik <jgarzik@pobox.com>
To: dougg@torque.net, SCSI Mailing List <linux-scsi@vger.kernel.org>
Subject: PATCH: scsi_debug bug
Date: Sun, 06 Jul 2003 11:38:36 -0400 [thread overview]
Message-ID: <3F08427C.4050706@pobox.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 261 bytes --]
No response the first time. Resending.
Can someone look at this patch and approve it, please?
It looks like an obvious bug and fix to me: MODE_SENSE_10 allocation
length LSB is in cdb byte 8, not byte 6.
This bug is present in both 2.4 and 2.5.
Jeff
[-- Attachment #2: patch --]
[-- Type: text/plain, Size: 560 bytes --]
===== drivers/scsi/scsi_debug.c 1.39 vs edited =====
--- 1.39/drivers/scsi/scsi_debug.c Mon Jun 2 20:42:21 2003
+++ edited/drivers/scsi/scsi_debug.c Sun Jun 29 15:06:03 2003
@@ -687,7 +687,7 @@
pcontrol = (cmd[2] & 0xc0) >> 6;
pcode = cmd[2] & 0x3f;
msense_6 = (MODE_SENSE == cmd[0]);
- alloc_len = msense_6 ? cmd[4] : ((cmd[7] << 8) | cmd[6]);
+ alloc_len = msense_6 ? cmd[4] : ((cmd[7] << 8) | cmd[8]);
/* printk(KERN_INFO "msense: dbd=%d pcontrol=%d pcode=%d "
"msense_6=%d alloc_len=%d\n", dbd, pcontrol, pcode, "
"msense_6, alloc_len); */
next reply other threads:[~2003-07-06 15:24 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-07-06 15:38 Jeff Garzik [this message]
2003-07-08 18:00 ` PATCH: scsi_debug bug dougg
2003-07-08 22:18 ` Alan Cox
-- strict thread matches above, loose matches on Subject: below --
2003-06-29 19:04 Jeff Garzik
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=3F08427C.4050706@pobox.com \
--to=jgarzik@pobox.com \
--cc=dougg@torque.net \
--cc=linux-scsi@vger.kernel.org \
/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