commit | 269230e7c52623cda279010c8032a6f5b59caaaf | [log] [tgz] |
---|---|---|
author | Herbert Xu <herbert@gondor.apana.org.au> | Mon Jun 27 15:45:19 2011 +0800 |
committer | Herbert Xu <herbert@gondor.apana.org.au> | Thu Jun 30 07:44:06 2011 +0800 |
tree | 4acb3b9d9e4b1f7b3151d8e91e3201524140893a | |
parent | 36ca239b245dbdec3b0c94976e956226bdd4108c [diff] |
crypto: algif_hash - Handle initial af_alg_make_sg error correctly When the first call to af_alg_make_sg fails, we may return garbage instead of the real error. This patch fixes it by setting the error if "copied" is zero. Based on a patch by Jesper Juhl. Reported-by: Jesper Juhl <jj@chaosbits.net> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>