diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2019-04-25 09:15:03 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2019-04-25 09:15:03 -0700 |
commit | c7abed54533a04862f5f8ca24be5ad15b4e52456 (patch) | |
tree | 6ab451dd0ebaca0cbbfa6bbca336452bcfa2d94f /crypto/xts.c | |
parent | c95988cbe5cc089733b1288c210f62b15d9d5c4b (diff) | |
parent | f7730050415e1200e8aabced2c66b0fd467f51d9 (diff) | |
download | linux-crypto-c7abed54533a04862f5f8ca24be5ad15b4e52456.tar.gz linux-crypto-c7abed54533a04862f5f8ca24be5ad15b4e52456.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 a bug in xts and lrw where they may sleep in an atomic
context"
* 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6:
crypto: lrw - Fix atomic sleep when walking skcipher
crypto: xts - Fix atomic sleep when walking skcipher
Diffstat (limited to 'crypto/xts.c')
-rw-r--r-- | crypto/xts.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/crypto/xts.c b/crypto/xts.c index 847f54f7..2f948328 100644 --- a/crypto/xts.c +++ b/crypto/xts.c @@ -137,8 +137,12 @@ static void crypt_done(struct crypto_async_request *areq, int err) { struct skcipher_request *req = areq->data; - if (!err) + if (!err) { + struct rctx *rctx = skcipher_request_ctx(req); + + rctx->subreq.base.flags &= ~CRYPTO_TFM_REQ_MAY_SLEEP; err = xor_tweak_post(req); + } skcipher_request_complete(req, err); } |