On Sat, 2006-06-03 at 13:21 +0200, Christoph Hellwig wrote: > Various scsi drivers use scsi_cmnd.buffer and scsi_cmnd.bufflen in their > queuecommand functions. Those fields are internal storage for the > midlayer only and are used to restore the original payload after > request_buffer and request_bufflen have been overwritten for EH. Using > the buffer and bufflen fields means they do very broken things in error > handling. We probably need this too, don't we? James diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c index f47538d..56665ae 100644 --- a/drivers/scsi/scsi_lib.c +++ b/drivers/scsi/scsi_lib.c @@ -1235,7 +1235,7 @@ static void scsi_blk_pc_done(struct scsi * successfully. Since this is a REQ_BLOCK_PC command the * caller should check the request's errors value */ - scsi_io_completion(cmd, cmd->bufflen, 0); + scsi_io_completion(cmd, cmd->request_bufflen, 0); } static void scsi_setup_blk_pc_cmnd(struct scsi_cmnd *cmd) - : send the line "unsubscribe linux-scsi" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html