summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHerbert Xu <herbert@gondor.apana.org.au>2010-11-28 16:28:01 +0800
committerMiloslav Trmač <mitr@redhat.com>2010-11-30 14:28:26 +0100
commit261175300abec2f55d1d84862bd8fff54a71de6d (patch)
tree1c3081113bced323e0f658e2d5974faff03438b9
parentf1d3cafc7f3684ce4e5f454c88cad155d07e047a (diff)
downloadkernel-crypto-261175300abec2f55d1d84862bd8fff54a71de6d.tar.gz
kernel-crypto-261175300abec2f55d1d84862bd8fff54a71de6d.tar.xz
kernel-crypto-261175300abec2f55d1d84862bd8fff54a71de6d.zip
crypto: algif_skcipher - Pass on error from af_alg_make_sg
The error returned from af_alg_make_sg is currently lost and we always pass on -EINVAL. This patch pases on the underlying error. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
-rw-r--r--crypto/algif_skcipher.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/crypto/algif_skcipher.c b/crypto/algif_skcipher.c
index 211c956952c..9b2f440e88a 100644
--- a/crypto/algif_skcipher.c
+++ b/crypto/algif_skcipher.c
@@ -472,7 +472,8 @@ static int skcipher_recvmsg(struct kiocb *unused, struct socket *sock,
goto unlock;
used = af_alg_make_sg(&ctx->rsgl, from, used, 1);
- if (used < 0)
+ err = used;
+ if (err < 0)
goto unlock;
ablkcipher_request_set_crypt(&ctx->req, sg,