diff options
author | Kashyap, Desai <kashyap.desai@lsi.com> | 2010-11-13 04:31:14 +0530 |
---|---|---|
committer | James Bottomley <James.Bottomley@suse.de> | 2010-12-21 12:24:03 -0600 |
commit | dd3741d30300f9cf1adc046773a4bb87252d96ac (patch) | |
tree | 948c762c9b1131ce0dd7d7eb8879d4c607908a58 /drivers/scsi/mpt2sas/mpt2sas_base.h | |
parent | 363fa50fc35357b1361fb63b0726335de993374a (diff) |
[SCSI] mpt2sas: Added sanity check for cb_idx and smid access.
Sometime it is seen that controller
firmware returns an invalid system message id (smid).
the oops is occurring becuase mpt_callbacks pointer is referenced to
either null or invalid virtual address. this is due to cb_idx set
incorrectly from routine _base_get_cb_idx. the cb_idx was set incorrectly
becuase there is no check to make sure smid is less than maxiumum
anticapted smid. to fix this issue, we add a check in
_base_get_cb_idx to make sure smid is not greater than
ioc->hba_queue_depth. in addition, a similar check was added to make
sure the reply address was less than the largest anticapated address.
Newer firmware has sovled this issue, however it good to have this sanity
check.
Signed-off-by: Kashyap Desai <kashyap.desai@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/scsi/mpt2sas/mpt2sas_base.h')
-rw-r--r-- | drivers/scsi/mpt2sas/mpt2sas_base.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/scsi/mpt2sas/mpt2sas_base.h b/drivers/scsi/mpt2sas/mpt2sas_base.h index 0b15a8bdebf..63f7a196f42 100644 --- a/drivers/scsi/mpt2sas/mpt2sas_base.h +++ b/drivers/scsi/mpt2sas/mpt2sas_base.h @@ -737,6 +737,8 @@ struct MPT2SAS_ADAPTER { u16 reply_sz; u8 *reply; dma_addr_t reply_dma; + u32 reply_dma_max_address; + u32 reply_dma_min_address; struct dma_pool *reply_dma_pool; /* reply free queue */ |