diff options
Diffstat (limited to 'arch/s390/crypto')
-rw-r--r-- | arch/s390/crypto/aes_s390.c | 8 | ||||
-rw-r--r-- | arch/s390/crypto/prng.c | 3 | ||||
-rw-r--r-- | arch/s390/crypto/sha_common.c | 2 |
3 files changed, 6 insertions, 7 deletions
diff --git a/arch/s390/crypto/aes_s390.c b/arch/s390/crypto/aes_s390.c index 6118890c946d..58f46734465f 100644 --- a/arch/s390/crypto/aes_s390.c +++ b/arch/s390/crypto/aes_s390.c | |||
@@ -78,14 +78,14 @@ static int setkey_fallback_cip(struct crypto_tfm *tfm, const u8 *in_key, | |||
78 | struct s390_aes_ctx *sctx = crypto_tfm_ctx(tfm); | 78 | struct s390_aes_ctx *sctx = crypto_tfm_ctx(tfm); |
79 | int ret; | 79 | int ret; |
80 | 80 | ||
81 | sctx->fallback.blk->base.crt_flags &= ~CRYPTO_TFM_REQ_MASK; | 81 | sctx->fallback.cip->base.crt_flags &= ~CRYPTO_TFM_REQ_MASK; |
82 | sctx->fallback.blk->base.crt_flags |= (tfm->crt_flags & | 82 | sctx->fallback.cip->base.crt_flags |= (tfm->crt_flags & |
83 | CRYPTO_TFM_REQ_MASK); | 83 | CRYPTO_TFM_REQ_MASK); |
84 | 84 | ||
85 | ret = crypto_cipher_setkey(sctx->fallback.cip, in_key, key_len); | 85 | ret = crypto_cipher_setkey(sctx->fallback.cip, in_key, key_len); |
86 | if (ret) { | 86 | if (ret) { |
87 | tfm->crt_flags &= ~CRYPTO_TFM_RES_MASK; | 87 | tfm->crt_flags &= ~CRYPTO_TFM_RES_MASK; |
88 | tfm->crt_flags |= (sctx->fallback.blk->base.crt_flags & | 88 | tfm->crt_flags |= (sctx->fallback.cip->base.crt_flags & |
89 | CRYPTO_TFM_RES_MASK); | 89 | CRYPTO_TFM_RES_MASK); |
90 | } | 90 | } |
91 | return ret; | 91 | return ret; |
@@ -174,7 +174,7 @@ static int fallback_init_cip(struct crypto_tfm *tfm) | |||
174 | if (IS_ERR(sctx->fallback.cip)) { | 174 | if (IS_ERR(sctx->fallback.cip)) { |
175 | pr_err("Allocating AES fallback algorithm %s failed\n", | 175 | pr_err("Allocating AES fallback algorithm %s failed\n", |
176 | name); | 176 | name); |
177 | return PTR_ERR(sctx->fallback.blk); | 177 | return PTR_ERR(sctx->fallback.cip); |
178 | } | 178 | } |
179 | 179 | ||
180 | return 0; | 180 | return 0; |
diff --git a/arch/s390/crypto/prng.c b/arch/s390/crypto/prng.c index b49c00ce65e9..aa819dac2360 100644 --- a/arch/s390/crypto/prng.c +++ b/arch/s390/crypto/prng.c | |||
@@ -6,11 +6,11 @@ | |||
6 | #include <linux/fs.h> | 6 | #include <linux/fs.h> |
7 | #include <linux/init.h> | 7 | #include <linux/init.h> |
8 | #include <linux/kernel.h> | 8 | #include <linux/kernel.h> |
9 | #include <linux/smp_lock.h> | ||
10 | #include <linux/miscdevice.h> | 9 | #include <linux/miscdevice.h> |
11 | #include <linux/module.h> | 10 | #include <linux/module.h> |
12 | #include <linux/moduleparam.h> | 11 | #include <linux/moduleparam.h> |
13 | #include <linux/random.h> | 12 | #include <linux/random.h> |
13 | #include <linux/slab.h> | ||
14 | #include <asm/debug.h> | 14 | #include <asm/debug.h> |
15 | #include <asm/uaccess.h> | 15 | #include <asm/uaccess.h> |
16 | 16 | ||
@@ -49,7 +49,6 @@ static unsigned char parm_block[32] = { | |||
49 | 49 | ||
50 | static int prng_open(struct inode *inode, struct file *file) | 50 | static int prng_open(struct inode *inode, struct file *file) |
51 | { | 51 | { |
52 | cycle_kernel_lock(); | ||
53 | return nonseekable_open(inode, file); | 52 | return nonseekable_open(inode, file); |
54 | } | 53 | } |
55 | 54 | ||
diff --git a/arch/s390/crypto/sha_common.c b/arch/s390/crypto/sha_common.c index 7903ec47e6b9..f42dbabc0d30 100644 --- a/arch/s390/crypto/sha_common.c +++ b/arch/s390/crypto/sha_common.c | |||
@@ -79,7 +79,7 @@ int s390_sha_final(struct shash_desc *desc, u8 *out) | |||
79 | memset(ctx->buf + index, 0x00, end - index - 8); | 79 | memset(ctx->buf + index, 0x00, end - index - 8); |
80 | 80 | ||
81 | /* | 81 | /* |
82 | * Append message length. Well, SHA-512 wants a 128 bit lenght value, | 82 | * Append message length. Well, SHA-512 wants a 128 bit length value, |
83 | * nevertheless we use u64, should be enough for now... | 83 | * nevertheless we use u64, should be enough for now... |
84 | */ | 84 | */ |
85 | bits = ctx->count * 8; | 85 | bits = ctx->count * 8; |