Thread (2 messages) 2 messages, 2 authors, 2012-08-18

Re: [patch] [SCSI] bnx2fc: zero out sense buffer properly

From: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Date: 2012-08-18 08:54:40
Also in: kernel-janitors, lkml

On Sat, 18 Aug 2012 11:46:37 +0300
Dan Carpenter [off-list ref] wrote:
quoted hunk ↗ jump to hunk
->sense_buffer used to be an array but it changed to pointer in
de25deb180 "[SCSI] use dynamically allocated sense buffer".  This call
to memset() needs to be updated as well.

Signed-off-by: Dan Carpenter <redacted>
diff --git a/drivers/scsi/bnx2fc/bnx2fc_io.c b/drivers/scsi/bnx2fc/bnx2fc_io.c
index 73f231c..8d4626c 100644
--- a/drivers/scsi/bnx2fc/bnx2fc_io.c
+++ b/drivers/scsi/bnx2fc/bnx2fc_io.c
@@ -1807,7 +1807,7 @@ static void bnx2fc_parse_fcp_rsp(struct bnx2fc_cmd *io_req,
 			fcp_sns_len = SCSI_SENSE_BUFFERSIZE;
 		}
 
-		memset(sc_cmd->sense_buffer, 0, sizeof(sc_cmd->sense_buffer));
+		memset(sc_cmd->sense_buffer, 0, SCSI_SENSE_BUFFERSIZE);
I guess that you can remove the line instead. IIRC, scsi-ml does it
for LLDs.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help