diff options
author | James Morris <james.l.morris@oracle.com> | 2017-12-11 17:01:08 +1100 |
---|---|---|
committer | James Morris <james.l.morris@oracle.com> | 2017-12-11 17:01:08 +1100 |
commit | 4a06f454768a7e11e8f10b900b450786546cbba1 (patch) | |
tree | 149f57c9ce794734883e326d63040b1381dc1a59 /crypto/xts.c | |
parent | fe6ec4634c4b41ea65f055ea709a6f3d5bf67bec (diff) | |
parent | 8dce1988dfaa3668372990f05ee2202d9d9521b5 (diff) | |
download | linux-crypto-4a06f454768a7e11e8f10b900b450786546cbba1.tar.gz linux-crypto-4a06f454768a7e11e8f10b900b450786546cbba1.zip |
Sync to v4.15-rc3 for security subsystem developers to work against.
Diffstat (limited to 'crypto/xts.c')
-rw-r--r-- | crypto/xts.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/crypto/xts.c b/crypto/xts.c index d86c11a8..f317c48b 100644 --- a/crypto/xts.c +++ b/crypto/xts.c @@ -269,9 +269,7 @@ static int do_encrypt(struct skcipher_request *req, int err) crypto_skcipher_encrypt(subreq) ?: post_crypt(req); - if (err == -EINPROGRESS || - (err == -EBUSY && - req->base.flags & CRYPTO_TFM_REQ_MAY_BACKLOG)) + if (err == -EINPROGRESS || err == -EBUSY) return err; } @@ -321,9 +319,7 @@ static int do_decrypt(struct skcipher_request *req, int err) crypto_skcipher_decrypt(subreq) ?: post_crypt(req); - if (err == -EINPROGRESS || - (err == -EBUSY && - req->base.flags & CRYPTO_TFM_REQ_MAY_BACKLOG)) + if (err == -EINPROGRESS || err == -EBUSY) return err; } @@ -554,8 +550,10 @@ static int create(struct crypto_template *tmpl, struct rtattr **tb) ctx->name[len - 1] = 0; if (snprintf(inst->alg.base.cra_name, CRYPTO_MAX_ALG_NAME, - "xts(%s)", ctx->name) >= CRYPTO_MAX_ALG_NAME) - return -ENAMETOOLONG; + "xts(%s)", ctx->name) >= CRYPTO_MAX_ALG_NAME) { + err = -ENAMETOOLONG; + goto err_drop_spawn; + } } else goto err_drop_spawn; |