diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2022-06-09 11:14:04 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2022-08-08 22:37:23 -0400 |
commit | 2fc0f27e29403eb73a7efafe9d7ea7f0b1286a9a (patch) | |
tree | 8e82875b77018dc72d1e4996d36fc74ae4d00ede /crypto/algif_hash.c | |
parent | 18b5873bea8f726253e6a284ab102b76af047996 (diff) | |
download | linux-crypto-2fc0f27e29403eb73a7efafe9d7ea7f0b1286a9a.tar.gz linux-crypto-2fc0f27e29403eb73a7efafe9d7ea7f0b1286a9a.zip |
af_alg_make_sg(): switch to advancing variant of iov_iter_get_pages()
... and adjust the callers
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to '')
-rw-r--r-- | crypto/algif_hash.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/crypto/algif_hash.c b/crypto/algif_hash.c index 50f7b22f..1d017ec5 100644 --- a/crypto/algif_hash.c +++ b/crypto/algif_hash.c @@ -102,11 +102,12 @@ static int hash_sendmsg(struct socket *sock, struct msghdr *msg, err = crypto_wait_req(crypto_ahash_update(&ctx->req), &ctx->wait); af_alg_free_sg(&ctx->sgl); - if (err) + if (err) { + iov_iter_revert(&msg->msg_iter, len); goto unlock; + } copied += len; - iov_iter_advance(&msg->msg_iter, len); } err = 0; |