FIXME: I need help with this driver (Pete?) I used scsi_sense() in a none const way. But since scsi_tgt is the ULD here, it can just access it's own sense buffer directly. I did not use scsi_eh_cpy_sense() because I did not want the extra copy. Pete will want to use a 260 bytes buffer here. Signed-off-by: Boaz Harrosh <bharrosh@xxxxxxxxxxx> Need-help-from: Pete Wyckoff <pw@xxxxxxx> --- drivers/scsi/scsi_tgt_lib.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/drivers/scsi/scsi_tgt_lib.c b/drivers/scsi/scsi_tgt_lib.c index e01a985..d42f318 100644 --- a/drivers/scsi/scsi_tgt_lib.c +++ b/drivers/scsi/scsi_tgt_lib.c @@ -29,6 +29,7 @@ #include <scsi/scsi_host.h> #include <scsi/scsi_transport.h> #include <scsi/scsi_tgt.h> +#include <scsi/scsi_eh.h> #include "scsi_tgt_priv.h" @@ -397,7 +398,7 @@ static int scsi_tgt_copy_sense(struct scsi_cmnd *cmd, unsigned long uaddr, { char __user *p = (char __user *) uaddr; - if (copy_from_user(cmd->sense_buffer, p, + if (copy_from_user(scsi_sense(cmd), p, min_t(unsigned, SCSI_SENSE_BUFFERSIZE, len))) { printk(KERN_ERR "Could not copy the sense buffer\n"); return -EIO; -- 1.5.3.3 - To unsubscribe from this list: 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