summaryrefslogtreecommitdiffstats
path: root/arch/s390/crypto
diff options
context:
space:
mode:
authorHarald Freudenberger <freude@linux.ibm.com>2024-02-08 08:34:25 +0100
committerHeiko Carstens <hca@linux.ibm.com>2024-03-07 14:41:15 +0100
commited6776c96c60ffe92e79e8f18bf5afd2f6e0eb79 (patch)
tree47f18eeecb9c90d0043936510441115c085127aa /arch/s390/crypto
parent5dabfecad4a0868201af2ffb69dcd3223f9ca630 (diff)
downloadlinux-stable-ed6776c96c60ffe92e79e8f18bf5afd2f6e0eb79.tar.gz
linux-stable-ed6776c96c60ffe92e79e8f18bf5afd2f6e0eb79.tar.bz2
linux-stable-ed6776c96c60ffe92e79e8f18bf5afd2f6e0eb79.zip
s390/crypto: remove retry loop with sleep from PAES pkey invocation
Upon calling the pkey module to (re-)derive an protected key from a secure key the PAES implementation did a retry 3 times with an 1000 ms sleep after each failure. This patch removes this retry loop - retries should be done if needed in a lower layer but the consumer of the pkey module functions should not be bothered with retries. Signed-off-by: Harald Freudenberger <freude@linux.ibm.com> Reviewed-by: Holger Dengler <dengler@linux.ibm.com> Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Diffstat (limited to 'arch/s390/crypto')
-rw-r--r--arch/s390/crypto/paes_s390.c16
1 files changed, 2 insertions, 14 deletions
diff --git a/arch/s390/crypto/paes_s390.c b/arch/s390/crypto/paes_s390.c
index 55ee5567a5ea..99f7e1f2b70a 100644
--- a/arch/s390/crypto/paes_s390.c
+++ b/arch/s390/crypto/paes_s390.c
@@ -125,20 +125,8 @@ struct s390_pxts_ctx {
static inline int __paes_keyblob2pkey(struct key_blob *kb,
struct pkey_protkey *pk)
{
- int i, ret;
-
- /* try three times in case of failure */
- for (i = 0; i < 3; i++) {
- if (i > 0 && ret == -EAGAIN && in_task())
- if (msleep_interruptible(1000))
- return -EINTR;
- ret = pkey_keyblob2pkey(kb->key, kb->keylen,
- pk->protkey, &pk->len, &pk->type);
- if (ret == 0)
- break;
- }
-
- return ret;
+ return pkey_keyblob2pkey(kb->key, kb->keylen,
+ pk->protkey, &pk->len, &pk->type);
}
static inline int __paes_convert_key(struct s390_paes_ctx *ctx)