public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
* re: [SCSI] be2iscsi: Fix handling timed out MBX completion from FW
@ 2014-03-28  8:41 Dan Carpenter
  0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2014-03-28  8:41 UTC (permalink / raw)
  To: jayamohan.kallickal; +Cc: linux-scsi

Hello Jayamohan Kallickal,

The patch 1957aa7f6246: "[SCSI] be2iscsi: Fix handling timed out MBX
completion from FW" from Jan 29, 2014, leads to the following static
checker warning:

	drivers/scsi/be2iscsi/be_main.c:5581 beiscsi_dev_probe()
	error: memset() '&phba->ctrl.ptag_state[i]->tag_mem_state' too small (24 vs 32)

drivers/scsi/be2iscsi/be_main.c
  5576          for (i = 0; i < MAX_MCC_CMD; i++) {
  5577                  init_waitqueue_head(&phba->ctrl.mcc_wait[i + 1]);
  5578                  phba->ctrl.mcc_tag[i] = i + 1;
  5579                  phba->ctrl.mcc_numtag[i + 1] = 0;
  5580                  phba->ctrl.mcc_tag_available++;
  5581                  memset(&phba->ctrl.ptag_state[i].tag_mem_state, 0,
  5582                         sizeof(struct beiscsi_mcc_tag_state));
                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Probably this this be change to sizeof(struct be_dma_mem struct)?  It
looks like we are corrupting memory a bit here.

  5583          }

regards,
dan carpenter

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2014-03-28  8:41 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-28  8:41 [SCSI] be2iscsi: Fix handling timed out MBX completion from FW Dan Carpenter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox