diff options
author | Herbert Xu <herbert@gondor.apana.org.au> | 2015-10-19 18:23:57 +0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-11-09 12:50:26 -0800 |
commit | 36ce9978ddfb0db0adf9e4bddcceca19be430801 (patch) | |
tree | 883632c01ae0e7e9231b4f1f15888b6644a2b54c /crypto/ablkcipher.c | |
parent | 9f0a848f82684f8f1417b3770a679a4441486bf7 (diff) | |
download | lwn-36ce9978ddfb0db0adf9e4bddcceca19be430801.tar.gz lwn-36ce9978ddfb0db0adf9e4bddcceca19be430801.zip |
crypto: api - Only abort operations on fatal signal
commit 3fc89adb9fa4beff31374a4bf50b3d099d88ae83 upstream.
Currently a number of Crypto API operations may fail when a signal
occurs. This causes nasty problems as the caller of those operations
are often not in a good position to restart the operation.
In fact there is currently no need for those operations to be
interrupted by user signals at all. All we need is for them to
be killable.
This patch replaces the relevant calls of signal_pending with
fatal_signal_pending, and wait_for_completion_interruptible with
wait_for_completion_killable, respectively.
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'crypto/ablkcipher.c')
-rw-r--r-- | crypto/ablkcipher.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto/ablkcipher.c b/crypto/ablkcipher.c index 40886c489903..520729d898fe 100644 --- a/crypto/ablkcipher.c +++ b/crypto/ablkcipher.c @@ -695,7 +695,7 @@ struct crypto_ablkcipher *crypto_alloc_ablkcipher(const char *alg_name, err: if (err != -EAGAIN) break; - if (signal_pending(current)) { + if (fatal_signal_pending(current)) { err = -EINTR; break; } |