diff options
author | Herbert Xu <herbert@gondor.apana.org.au> | 2015-10-19 18:23:57 +0800 |
---|---|---|
committer | Luis Henriques <luis.henriques@canonical.com> | 2015-11-16 11:27:09 +0000 |
commit | b5d9cdc941b641d20cf8b7579a1e0af866c12f13 (patch) | |
tree | 899220343b96ac4cb43d989b362838eb177434e4 /crypto/crypto_user.c | |
parent | 2a2fb9c014b13dcaf0a09034ce74f7bb15c9e778 (diff) | |
download | linux-stable-b5d9cdc941b641d20cf8b7579a1e0af866c12f13.tar.gz linux-stable-b5d9cdc941b641d20cf8b7579a1e0af866c12f13.tar.bz2 linux-stable-b5d9cdc941b641d20cf8b7579a1e0af866c12f13.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: Luis Henriques <luis.henriques@canonical.com>
Diffstat (limited to 'crypto/crypto_user.c')
-rw-r--r-- | crypto/crypto_user.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto/crypto_user.c b/crypto/crypto_user.c index e2a34feec7a4..c90af2537d24 100644 --- a/crypto/crypto_user.c +++ b/crypto/crypto_user.c @@ -367,7 +367,7 @@ static struct crypto_alg *crypto_user_aead_alg(const char *name, u32 type, err = PTR_ERR(alg); if (err != -EAGAIN) break; - if (signal_pending(current)) { + if (fatal_signal_pending(current)) { err = -EINTR; break; } |