summaryrefslogtreecommitdiff
path: root/crypto
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2016-12-15 11:41:37 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2016-12-15 11:41:37 -0800
commitf9c3d576cfe576ff20ba3b1bb1f2ce1f31d4dba4 (patch)
tree61a5ed81b3f0de0fdfbe9b270826a37e2a91f3ba /crypto
parentcf3abfac5172e4b399a410bc54b70127ebf41ffc (diff)
parent0a7bcaff1b2f8b324e733ea7bcbd6967ed6b31f1 (diff)
downloadlinux-crypto-f9c3d576cfe576ff20ba3b1bb1f2ce1f31d4dba4.tar.gz
linux-crypto-f9c3d576cfe576ff20ba3b1bb1f2ce1f31d4dba4.zip
Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
Pull crypto fixes from Herbert Xu: "This fixes the following issues: - a crash regression in the new skcipher walker - incorrect return value in public_key_verify_signature - fix for in-place signing in the sign-file utility" * 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: crypto: skcipher - fix crash in virtual walk sign-file: Fix inplace signing when src and dst names are both specified crypto: asymmetric_keys - set error code on failure
Diffstat (limited to 'crypto')
-rw-r--r--crypto/asymmetric_keys/public_key.c1
-rw-r--r--crypto/skcipher.c4
2 files changed, 4 insertions, 1 deletions
diff --git a/crypto/asymmetric_keys/public_key.c b/crypto/asymmetric_keys/public_key.c
index fd76b5fc..d3a989e7 100644
--- a/crypto/asymmetric_keys/public_key.c
+++ b/crypto/asymmetric_keys/public_key.c
@@ -121,6 +121,7 @@ int public_key_verify_signature(const struct public_key *pkey,
if (ret)
goto error_free_req;
+ ret = -ENOMEM;
outlen = crypto_akcipher_maxsize(tfm);
output = kmalloc(outlen, GFP_KERNEL);
if (!output)
diff --git a/crypto/skcipher.c b/crypto/skcipher.c
index aca07c64..0e1e6c35 100644
--- a/crypto/skcipher.c
+++ b/crypto/skcipher.c
@@ -226,7 +226,9 @@ static int skcipher_next_slow(struct skcipher_walk *walk, unsigned int bsize)
void *v;
if (!phys) {
- buffer = walk->buffer ?: walk->page;
+ if (!walk->buffer)
+ walk->buffer = walk->page;
+ buffer = walk->buffer;
if (buffer)
goto ok;
}