crypto: api - Only abort operations on fatal signal
authorHerbert Xu <herbert@gondor.apana.org.au>
Mon, 19 Oct 2015 10:23:57 +0000 (18:23 +0800)
committerBen Hutchings <ben@decadent.org.uk>
Tue, 17 Nov 2015 15:54:44 +0000 (15:54 +0000)
commitff4b4b7e746fec864262066eadcc66f7e28575f8
treef542b390e27d4530247719ab0098a70c6db4e075
parentc79e716dd2eb51b353b7e4e71b9680627b069fb9
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>
[bwh: Backported to 3.2: drop change to crypto_user_skcipher_alg(), which
 we don't have]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
crypto/ablkcipher.c
crypto/algapi.c
crypto/api.c