From: Mark Lord Date: Wed, 7 Dec 2005 22:46:57 +0000 (-0500) Subject: [SCSI] Fix incorrect pointer in megaraid.c MODE_SENSE emulation X-Git-Tag: firefly_0821_release~38603^2~84^2~5 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=f0353301e6752399ceb874ede7f44e3571c5e4f3;p=firefly-linux-kernel-4.4.55.git [SCSI] Fix incorrect pointer in megaraid.c MODE_SENSE emulation The SCSI megaraid drive goes to great effort to kmap the scatterlist buffer (if used), but then uses the wrong pointer when copying to it afterward. Signed-off-by: Mark Lord Acked by: Ju, Seokmann Signed-off-by: James Bottomley --- diff --git a/drivers/scsi/megaraid.c b/drivers/scsi/megaraid.c index f9792528e33f..578143e93a6f 100644 --- a/drivers/scsi/megaraid.c +++ b/drivers/scsi/megaraid.c @@ -664,7 +664,7 @@ mega_build_cmd(adapter_t *adapter, Scsi_Cmnd *cmd, int *busy) sg->offset; } else buf = cmd->request_buffer; - memset(cmd->request_buffer, 0, cmd->cmnd[4]); + memset(buf, 0, cmd->cmnd[4]); if (cmd->use_sg) { struct scatterlist *sg;