Patch "powerpc/eeh: Fix pseries_eeh_configure_bridge()" has been added to the 4.19-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    powerpc/eeh: Fix pseries_eeh_configure_bridge()

to the 4.19-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     powerpc-eeh-fix-pseries_eeh_configure_bridge.patch
and it can be found in the queue-4.19 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 03c8a9c0fa59b5b5bbb8a2e0bdede1e851845d2e
Author: Sam Bobroff <sbobroff@xxxxxxxxxxxxx>
Date:   Tue Apr 28 13:45:05 2020 +1000

    powerpc/eeh: Fix pseries_eeh_configure_bridge()
    
    [ Upstream commit 6fa13640aea7bb0760846981aa2da4245307bd26 ]
    
    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.
    
    Signed-off-by: Sam Bobroff <sbobroff@xxxxxxxxxxxxx>
    Signed-off-by: Michael Ellerman <mpe@xxxxxxxxxxxxxx>
    Reviewed-by: Nathan Lynch <nathanl@xxxxxxxxxxxxx>
    Link: https://lore.kernel.org/r/1b0a6010a647dc915816e44845b64d72066676a7.1588045502.git.sbobroff@xxxxxxxxxxxxx
    Stable-dep-of: 9aafbfa5f57a ("powerpc/pseries/eeh: use correct API for error log size")
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/arch/powerpc/platforms/pseries/eeh_pseries.c b/arch/powerpc/platforms/pseries/eeh_pseries.c
index 2713d2aa963c..0fc93f7e167d 100644
--- a/arch/powerpc/platforms/pseries/eeh_pseries.c
+++ b/arch/powerpc/platforms/pseries/eeh_pseries.c
@@ -684,6 +684,8 @@ static int pseries_eeh_configure_bridge(struct eeh_pe *pe)
 
 		if (!ret)
 			return ret;
+		if (ret < 0)
+			break;
 
 		/*
 		 * If RTAS returns a delay value that's above 100ms, cut it
@@ -704,7 +706,11 @@ static int pseries_eeh_configure_bridge(struct eeh_pe *pe)
 
 	pr_warn("%s: Unable to configure bridge PHB#%x-PE#%x (%d)\n",
 		__func__, pe->phb->global_number, pe->addr, ret);
-	return ret;
+	/* PAPR defines -3 as "Parameter Error" for this function: */
+	if (ret == -3)
+		return -EINVAL;
+	else
+		return -EIO;
 }
 
 /**



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux