powerpc/pseries: Return -EIO instead of -EINTR for H_ABORTED error
authorNayna Jain <nayna@linux.ibm.com>
Sun, 6 Nov 2022 20:58:36 +0000 (15:58 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 31 Dec 2022 12:32:50 +0000 (13:32 +0100)
[ Upstream commit bb8e4c7cb759b90a04f2e94056b50288ff46a0ed ]

Some commands for eg. "cat" might continue to retry on encountering
EINTR. This is not expected for original error code H_ABORTED.

Map H_ABORTED to more relevant Linux error code EIO.

Fixes: 2454a7af0f2a ("powerpc/pseries: define driver for Platform KeyStore")
Signed-off-by: Nayna Jain <nayna@linux.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20221106205839.600442-4-nayna@linux.ibm.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/powerpc/platforms/pseries/plpks.c

index 32ce4d780d8f565d267640bb8d683f0da99c3d3c..cbea447122ca0e0c66e2b1fbbfe79ba3e41f5793 100644 (file)
@@ -111,7 +111,7 @@ static int pseries_status_to_err(int rc)
                err = -EEXIST;
                break;
        case H_ABORTED:
-               err = -EINTR;
+               err = -EIO;
                break;
        default:
                err = -EINVAL;