diff options
author | James Smart <james.smart@emulex.com> | 2010-02-12 14:43:01 -0500 |
---|---|---|
committer | James Bottomley <James.Bottomley@suse.de> | 2010-02-17 17:41:19 -0600 |
commit | 72100cc43262fa39821b3debc04be1a7a17b3428 (patch) | |
tree | 2f313571ee9c9cf4d4a16f2a6e69f82c569b9757 /drivers/scsi/lpfc/lpfc_mbox.c | |
parent | 84d1b006978e78e27f22beb5cfbc4d349bac6df7 (diff) | |
download | blackbird-op-linux-72100cc43262fa39821b3debc04be1a7a17b3428.tar.gz blackbird-op-linux-72100cc43262fa39821b3debc04be1a7a17b3428.zip |
[SCSI] lpfc 8.3.9: Fix locking and memory issues
- Use the hbalock when changing the fc_flag.
- Use the host_lock when changeing the sli_flag.
- Prevent NULL pointer dereference after dma_alloc_coherent failure.
Signed-off-by: James Smart <james.smart@emulex.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/scsi/lpfc/lpfc_mbox.c')
-rw-r--r-- | drivers/scsi/lpfc/lpfc_mbox.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/scsi/lpfc/lpfc_mbox.c b/drivers/scsi/lpfc/lpfc_mbox.c index 6c1d8b3fe8cc..6c4dce1a30ca 100644 --- a/drivers/scsi/lpfc/lpfc_mbox.c +++ b/drivers/scsi/lpfc/lpfc_mbox.c @@ -1707,7 +1707,8 @@ lpfc_sli4_config(struct lpfc_hba *phba, struct lpfcMboxq *mbox, alloc_len - sizeof(union lpfc_sli4_cfg_shdr); } /* The sub-header is in DMA memory, which needs endian converstion */ - lpfc_sli_pcimem_bcopy(cfg_shdr, cfg_shdr, + if (cfg_shdr) + lpfc_sli_pcimem_bcopy(cfg_shdr, cfg_shdr, sizeof(union lpfc_sli4_cfg_shdr)); return alloc_len; |