Commit 0f17574a authored by linas's avatar linas Committed by Paul Mackerras

[PATCH] powerpc/pseries: dlpar-add crash on null pointer deref

This fixes a crash on null-pointer deref during dlpar slot addition.
Signed-off-by: default avatarLinas Vepstas <linas@austin.ibm.com>
Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
(cherry picked from 1c87c0f84943fbbc91826967ff4fea1b059a526f commit)
parent 18eb3b39
...@@ -698,7 +698,7 @@ static void *early_enable_eeh(struct device_node *dn, void *data) ...@@ -698,7 +698,7 @@ static void *early_enable_eeh(struct device_node *dn, void *data)
int enable; int enable;
struct pci_dn *pdn = PCI_DN(dn); struct pci_dn *pdn = PCI_DN(dn);
pdn->class_code = *class_code; pdn->class_code = 0;
pdn->eeh_mode = 0; pdn->eeh_mode = 0;
pdn->eeh_check_count = 0; pdn->eeh_check_count = 0;
pdn->eeh_freeze_count = 0; pdn->eeh_freeze_count = 0;
...@@ -715,6 +715,7 @@ static void *early_enable_eeh(struct device_node *dn, void *data) ...@@ -715,6 +715,7 @@ static void *early_enable_eeh(struct device_node *dn, void *data)
pdn->eeh_mode |= EEH_MODE_NOCHECK; pdn->eeh_mode |= EEH_MODE_NOCHECK;
return NULL; return NULL;
} }
pdn->class_code = *class_code;
/* /*
* Now decide if we are going to "Disable" EEH checking * Now decide if we are going to "Disable" EEH checking
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment