[lkml]   [2007]   [Jan]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Patch in this message
Subject[patch 16/50] SCSI: add missing cdb clearing in scsi_execute()
-stable review patch.  If anyone has any objections, please let us know.

From: Tejun Heo <>

Clear-garbage-after-CDB patch missed scsi_execute() and it causes some
ODDs (HL-DT-ST DVD-RAM GSA-H30N) choke during SCSI scan. Note that
this patch is only for -stable. There is another more reliable fix
for this problem proposed for devel tree.

Signed-off-by: Tejun Heo <>
Cc: Jens Axboe <>
Cc: Douglas Gilbert <>
Signed-off-by: Chris Wright <>

drivers/scsi/scsi_lib.c | 1 +
1 file changed, 1 insertion(+)

--- linux-
+++ linux-
@@ -191,6 +191,7 @@ int scsi_execute(struct scsi_device *sde
goto out;

req->cmd_len = COMMAND_SIZE(cmd[0]);
+ memset(req->cmd, 0, BLK_MAX_CDB); /* ATAPI hates garbage after CDB */
memcpy(req->cmd, cmd, req->cmd_len);
req->sense = sense;
req->sense_len = 0;
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2007-01-06 03:47    [W:0.158 / U:1.672 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site