[PATCH 1/4] powerpc/eeh: fix pseries_eeh_configure_bridge()
Oliver O'Halloran
oohall at gmail.com
Fri Apr 3 15:19:17 AEDT 2020
On Mon, 2020-03-30 at 15:56 +1100, Sam Bobroff wrote:
> If a device is hot unplgged during EEH recovery, it's possible for the
> RTAS call to ibm,configure-pe in pseries_eeh_configure() to return
> parameter error (-3), however negative return values are not checked
> for and this leads to an infinite loop.
>
> Fix this by correctly bailing out on negative values.
>
This should probably be a standalone patch. Looks fine otherwise.
Reviewed-by: Oliver O'Halloran <oohall at gmail.com>
> Signed-off-by: Sam Bobroff <sbobroff at linux.ibm.com>
> ---
> arch/powerpc/platforms/pseries/eeh_pseries.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/powerpc/platforms/pseries/eeh_pseries.c b/arch/powerpc/platforms/pseries/eeh_pseries.c
> index 893ba3f562c4..c4ef03bec0de 100644
> --- a/arch/powerpc/platforms/pseries/eeh_pseries.c
> +++ b/arch/powerpc/platforms/pseries/eeh_pseries.c
> @@ -605,7 +605,7 @@ static int pseries_eeh_configure_bridge(struct eeh_pe *pe)
> config_addr, BUID_HI(pe->phb->buid),
> BUID_LO(pe->phb->buid));
>
> - if (!ret)
> + if (ret <= 0)
> return ret;
>
> /*
More information about the Linuxppc-dev
mailing list