* [3.3-rc PATCH] isci: Fix NULL ptr dereference when no firmware is being loaded
@ 2012-01-27 19:17 Dan Williams
0 siblings, 0 replies; only message in thread
From: Dan Williams @ 2012-01-27 19:17 UTC (permalink / raw)
To: linux-scsi; +Cc: Dave Jiang, Dan Melnic
From: Dave Jiang <dave.jiang@intel.com>
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>
---
for scsi-fixes / 3.3
drivers/scsi/isci/host.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/drivers/scsi/isci/host.c b/drivers/scsi/isci/host.c
index 1a65d65..418391b 100644
--- a/drivers/scsi/isci/host.c
+++ b/drivers/scsi/isci/host.c
@@ -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;
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2012-01-27 19:17 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-27 19:17 [3.3-rc PATCH] isci: Fix NULL ptr dereference when no firmware is being loaded Dan Williams
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox