summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/csiostor/csio_rnode.h
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2013-03-16 13:07:56 +0300
committerJames Bottomley <JBottomley@Parallels.com>2013-05-02 07:37:10 -0700
commit4f8d1bd273684385fa8e8e4f9b8bd6107016ece8 (patch)
tree733e563e854d5fd62c24d0125b1abf440f228768 /drivers/scsi/csiostor/csio_rnode.h
parent0a7d1d360aa3c7578deff480db080ac2544725e8 (diff)
downloadtalos-obmc-linux-4f8d1bd273684385fa8e8e4f9b8bd6107016ece8.tar.gz
talos-obmc-linux-4f8d1bd273684385fa8e8e4f9b8bd6107016ece8.zip
[SCSI] csiostor: off by one error
We need to store PROTO_ERR_IMPL_LOGO (26) things here, but the first element isn't used so the array should have 27 elements. This matches fwevt_to_rnevt[] which has 27 elements. The patch solves a Smatch static checker warning on my system: drivers/scsi/csiostor/csio_rnode.c:880 csio_rnode_fwevt_handler() error: buffer overflow '(rn)->stats.n_evt_fw' 26 <= 26 Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Acked-by: Naresh Kumar Inna <naresh@chelsio.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers/scsi/csiostor/csio_rnode.h')
-rw-r--r--drivers/scsi/csiostor/csio_rnode.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/scsi/csiostor/csio_rnode.h b/drivers/scsi/csiostor/csio_rnode.h
index 65940096a80d..433434221222 100644
--- a/drivers/scsi/csiostor/csio_rnode.h
+++ b/drivers/scsi/csiostor/csio_rnode.h
@@ -63,7 +63,7 @@ struct csio_rnode_stats {
uint32_t n_err_nomem; /* error nomem */
uint32_t n_evt_unexp; /* unexpected event */
uint32_t n_evt_drop; /* unexpected event */
- uint32_t n_evt_fw[PROTO_ERR_IMPL_LOGO]; /* fw events */
+ uint32_t n_evt_fw[PROTO_ERR_IMPL_LOGO + 1]; /* fw events */
enum csio_rn_ev n_evt_sm[CSIO_RNFE_MAX_EVENT]; /* State m/c events */
uint32_t n_lun_rst; /* Number of resets of
* of LUNs under this
OpenPOWER on IntegriCloud