Skip to contentSkip to conversation

PATCH: scsi_debug bug

PATCH Jeff Garzik 3 participants 3 messages Jul 6, 2003 – Jul 8, 2003 SCSI

lore
Share & tools
lore
#0 lore raw

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

===== drivers/scsi/scsi_debug.c 1.39 vs edited =====

drivers/scsi/scsi_debug.c +1 -1
@@ -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); */
#1 lore raw

Quoting Jeff Garzik <[email protected]>:

Quoted 8 lines

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,
Guilty as charged.

Sorry for the long delay in responding. Hopefully James and/or Mike Anderson can put the patch in the bk scsi repository for the lk 2.5 series.

For the lk 2.4 series, please send a patch to Marcelo and cc Alan.

Doug Gilbert

-------------------------------------------------
This mail sent through IMP: http://horde.org/imp/

#2 lore raw
Quoted 8 lines · On Maw, 2003-07-08 at 19:00, [email protected] wrote:

Guilty as charged.

Sorry for the long delay in responding. Hopefully James and/or Mike Anderson can put the patch in the bk scsi repository for the lk 2.5 series.

For the lk 2.4 series, please send a patch to Marcelo and cc Alan.

Already merged