diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2012-12-07 13:56:22 +0300 |
---|---|---|
committer | James Bottomley <JBottomley@Parallels.com> | 2013-01-29 13:57:34 +1100 |
commit | 66331e8cf5cd8b387891e3ec0ef1d95e224ee976 (patch) | |
tree | 03760a762cc9fff5577fb276bee5b907eda27b45 /drivers/scsi/mpt3sas | |
parent | f07cda8fa9bcf83b5317a0b478d7b6ea4f59facf (diff) | |
download | kernel_goldelico_gta04-66331e8cf5cd8b387891e3ec0ef1d95e224ee976.zip kernel_goldelico_gta04-66331e8cf5cd8b387891e3ec0ef1d95e224ee976.tar.gz kernel_goldelico_gta04-66331e8cf5cd8b387891e3ec0ef1d95e224ee976.tar.bz2 |
[SCSI] mpt3sas: cut and paste bug storing trigger mpi
ioc->diag_trigger_mpi is an SL_WH_MPI_TRIGGERS_T struct.
There is a cut and paste error here and SL_WH_EVENT_TRIGGERS_T is used
instead of SL_WH_MPI_TRIGGERS_T. Since the SL_WH_EVENT_TRIGGERS_T is
smaller than SL_WH_MPI_TRIGGERS_T, it means we only clear part of the
buffer.
I've changed it to use sizeof(ioc->diag_trigger_mpi) which is a bit
simpler.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: "Sreekanth Reddy" <Sreekanth.reddy@lsi.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers/scsi/mpt3sas')
-rw-r--r-- | drivers/scsi/mpt3sas/mpt3sas_ctl.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/scsi/mpt3sas/mpt3sas_ctl.c b/drivers/scsi/mpt3sas/mpt3sas_ctl.c index 8af944d..02cd945 100644 --- a/drivers/scsi/mpt3sas/mpt3sas_ctl.c +++ b/drivers/scsi/mpt3sas/mpt3sas_ctl.c @@ -3136,7 +3136,7 @@ _ctl_diag_trigger_mpi_store(struct device *cdev, spin_lock_irqsave(&ioc->diag_trigger_lock, flags); sz = min(sizeof(struct SL_WH_MPI_TRIGGERS_T), count); memset(&ioc->diag_trigger_mpi, 0, - sizeof(struct SL_WH_EVENT_TRIGGERS_T)); + sizeof(ioc->diag_trigger_mpi)); memcpy(&ioc->diag_trigger_mpi, buf, sz); if (ioc->diag_trigger_mpi.ValidEntries > NUM_VALID_ENTRIES) ioc->diag_trigger_mpi.ValidEntries = NUM_VALID_ENTRIES; |