[SCSI] qla2xxx: Correct late-memset() of EFT buffer.

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Linux Kernel Mailing List
Date: Friday, January 25, 2008 - 7:08 pm

Gitweb:     http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=fc4476...
Commit:     fc44765f5a232d451fa58a04606b254ac257b429
Parent:     df613b96077cee826b14089ae6e75eeabf71faa3
Author:     Andrew Vasquez <andrew.vasquez@qlogic.com>
AuthorDate: Thu Jan 17 09:02:18 2008 -0800
Committer:  James Bottomley <James.Bottomley@HansenPartnership.com>
CommitDate: Wed Jan 23 11:29:32 2008 -0600

    [SCSI] qla2xxx: Correct late-memset() of EFT buffer.
    
    Original code would clear the buffer after the firmware had
    already been initialized to use the buffer, thus potentially
    and inadvertantly clearing data previously DMA'd by the
    firmware.
    
    Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
    Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
---
 drivers/scsi/qla2xxx/qla_init.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c
index cacfd25..7637fa7 100644
--- a/drivers/scsi/qla2xxx/qla_init.c
+++ b/drivers/scsi/qla2xxx/qla_init.c
@@ -766,6 +766,7 @@ qla2x00_alloc_fw_dump(scsi_qla_host_t *ha)
 			goto cont_alloc;
 		}
 
+		memset(tc, 0, EFT_SIZE);
 		rval = qla2x00_enable_eft_trace(ha, tc_dma, EFT_NUM_BUFFERS);
 		if (rval) {
 			qla_printk(KERN_WARNING, ha, "Unable to initialize "
@@ -779,7 +780,6 @@ qla2x00_alloc_fw_dump(scsi_qla_host_t *ha)
 		    EFT_SIZE / 1024);
 
 		eft_size = EFT_SIZE;
-		memset(tc, 0, eft_size);
 		ha->eft_dma = tc_dma;
 		ha->eft = tc;
 
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[SCSI] qla2xxx: Correct late-memset() of EFT buffer., Linux Kernel Mailing ..., (Fri Jan 25, 7:08 pm)