diff options
author | Herbert Xu <herbert@gondor.apana.org.au> | 2015-10-19 12:23:57 +0200 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2015-10-20 15:59:25 +0200 |
commit | 3fc89adb9fa4beff31374a4bf50b3d099d88ae83 (patch) | |
tree | c9df7595414423aaadf10a8488a88a85139420a6 /crypto/crypto_user.c | |
parent | crypto: ahash - ensure statesize is non-zero (diff) | |
download | linux-3fc89adb9fa4beff31374a4bf50b3d099d88ae83.tar.xz linux-3fc89adb9fa4beff31374a4bf50b3d099d88ae83.zip |
crypto: api - Only abort operations on fatal signal
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.
Cc: stable@vger.kernel.org
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
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 d94d99ffe8b9..237f3795cfaa 100644 --- a/crypto/crypto_user.c +++ b/crypto/crypto_user.c @@ -375,7 +375,7 @@ static struct crypto_alg *crypto_user_skcipher_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; } |