Thread (12 messages) 12 messages, 3 authors, 2022-11-30

Re: [PATCH 3/6] powerpc/pseries: Return -EIO instead of -EINTR for H_ABORTED error

From: Andrew Donnellan <hidden>
Date: 2022-11-30 02:57:11

On Sun, 2022-11-06 at 15:58 -0500, Nayna Jain wrote:
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>
The interface spec states that, for PKS-related hcalls, H_Aborted means
"error occurred processing request" rather than something that would
specifically map to EINTR, so I think EIO is appropriate here.

Reviewed-by: Andrew Donnellan <redacted>
quoted hunk ↗ jump to hunk
---
 arch/powerpc/platforms/pseries/plpks.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/powerpc/platforms/pseries/plpks.c
b/arch/powerpc/platforms/pseries/plpks.c
index 32ce4d780d8f..cbea447122ca 100644
--- a/arch/powerpc/platforms/pseries/plpks.c
+++ b/arch/powerpc/platforms/pseries/plpks.c
@@ -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;
-- 
Andrew Donnellan    OzLabs, ADL Canberra
ajd@linux.ibm.com   IBM Australia Limited
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help