diff options
author | Ingo Molnar <mingo@kernel.org> | 2017-11-07 10:51:10 +0100 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2017-11-07 10:51:10 +0100 |
commit | 141d3b1daacd11bdbd6fa74c2b163093e10d17ee (patch) | |
tree | 04c98496f16ad2fe34c0cf4f31fedf4fe558c017 /crypto/skcipher.c | |
parent | x86/vector/msi: Select CONFIG_GENERIC_IRQ_RESERVATION_MODE (diff) | |
parent | Merge branch 'for-4.14-fixes' of git://git.kernel.org/pub/scm/linux/kernel/gi... (diff) | |
download | linux-141d3b1daacd11bdbd6fa74c2b163093e10d17ee.tar.xz linux-141d3b1daacd11bdbd6fa74c2b163093e10d17ee.zip |
Merge branch 'linus' into x86/apic, to resolve conflicts
Conflicts:
arch/x86/include/asm/x2apic.h
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'crypto/skcipher.c')
-rw-r--r-- | crypto/skcipher.c | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/crypto/skcipher.c b/crypto/skcipher.c index 4faa0fd53b0c..d5692e35fab1 100644 --- a/crypto/skcipher.c +++ b/crypto/skcipher.c @@ -426,14 +426,9 @@ static int skcipher_copy_iv(struct skcipher_walk *walk) static int skcipher_walk_first(struct skcipher_walk *walk) { - walk->nbytes = 0; - if (WARN_ON_ONCE(in_irq())) return -EDEADLK; - if (unlikely(!walk->total)) - return 0; - walk->buffer = NULL; if (unlikely(((unsigned long)walk->iv & walk->alignmask))) { int err = skcipher_copy_iv(walk); @@ -452,10 +447,15 @@ static int skcipher_walk_skcipher(struct skcipher_walk *walk, { struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(req); + walk->total = req->cryptlen; + walk->nbytes = 0; + + if (unlikely(!walk->total)) + return 0; + scatterwalk_start(&walk->in, req->src); scatterwalk_start(&walk->out, req->dst); - walk->total = req->cryptlen; walk->iv = req->iv; walk->oiv = req->iv; @@ -509,6 +509,11 @@ static int skcipher_walk_aead_common(struct skcipher_walk *walk, struct crypto_aead *tfm = crypto_aead_reqtfm(req); int err; + walk->nbytes = 0; + + if (unlikely(!walk->total)) + return 0; + walk->flags &= ~SKCIPHER_WALK_PHYS; scatterwalk_start(&walk->in, req->src); |