Skip to content

Commit

Permalink
[SCSI] isci: Fix NULL ptr dereference when no firmware is being loaded
Browse files Browse the repository at this point in the history
NULL orom ptr passed in for verification which caused page fault.
We will set a default version when we don't have orom struct.

Reported-by: Dan Melnic <dan@seamicro.com>
Signed-off-by: Dave Jiang <dave.jiang@intel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
  • Loading branch information
Dave Jiang authored and James Bottomley committed Feb 18, 2012
1 parent a92fa25 commit 6d7938f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/scsi/isci/host.c
Original file line number Diff line number Diff line change
Expand Up @@ -1848,9 +1848,11 @@ static enum sci_status sci_oem_parameters_set(struct isci_host *ihost)
if (state == SCIC_RESET ||
state == SCIC_INITIALIZING ||
state == SCIC_INITIALIZED) {
u8 oem_version = pci_info->orom ? pci_info->orom->hdr.version :
ISCI_ROM_VER_1_0;

if (sci_oem_parameters_validate(&ihost->oem_parameters,
pci_info->orom->hdr.version))
oem_version))
return SCI_FAILURE_INVALID_PARAMETER_VALUE;

return SCI_SUCCESS;
Expand Down

0 comments on commit 6d7938f

Please sign in to comment.