Skip to content

Commit

Permalink
powerpc/pseries: Return -EIO instead of -EINTR for H_ABORTED error
Browse files Browse the repository at this point in the history
[ Upstream commit bb8e4c7 ]

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: 2454a7a ("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>
  • Loading branch information
naynajain authored and gregkh committed Dec 31, 2022
1 parent 1a7657a commit c156df8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/powerpc/platforms/pseries/plpks.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit c156df8

Please sign in to comment.