Synchronize access to eeh_pe. Signed-off-by: Sam Bobroff <sbobr...@linux.ibm.com> --- arch/powerpc/kernel/eeh.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/arch/powerpc/kernel/eeh.c b/arch/powerpc/kernel/eeh.c index 7eb6ca1ab72b..eb37cb384ff4 100644 --- a/arch/powerpc/kernel/eeh.c +++ b/arch/powerpc/kernel/eeh.c @@ -394,7 +394,7 @@ static int eeh_phb_check_failure(struct eeh_pe *pe) return -EPERM; /* Find the PHB PE */ - phb_pe = eeh_phb_pe_get(pe->phb); + phb_pe = eeh_phb_pe_get(pe->phb); /* Acquire ref */ if (!phb_pe) { pr_warn("%s Can't find PE for PHB#%x\n", __func__, pe->phb->global_number); @@ -422,9 +422,10 @@ static int eeh_phb_check_failure(struct eeh_pe *pe) pr_debug("EEH: PHB#%x failure detected, location: %s\n", phb_pe->phb->global_number, eeh_pe_loc_get(phb_pe)); - eeh_send_failure_event(phb_pe); + eeh_send_failure_event(phb_pe); /* Give ref */ return 1; out: + eeh_put_pe(phb_pe); /* Release ref */ eeh_serialize_unlock(flags); return ret; } -- 2.22.0.216.g00a2a96fc9