aboutsummaryrefslogtreecommitdiffstats
path: root/crypto
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2018-07-20 14:45:10 -0700
committerDavid S. Miller <davem@davemloft.net>2018-07-20 21:17:12 -0700
commitc4c5551df136a7c4edd7c2f433d9a296b39826a2 (patch)
treea33d9f228efd34b0ad18e380385093405ef72d98 /crypto
parenttipc: make link capability update thread safe (diff)
parentMerge tag 'vfio-v4.18-rc6' of git://github.com/awilliam/linux-vfio (diff)
downloadlinux-dev-c4c5551df136a7c4edd7c2f433d9a296b39826a2.tar.xz
linux-dev-c4c5551df136a7c4edd7c2f433d9a296b39826a2.zip
Merge ra.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux
All conflicts were trivial overlapping changes, so reasonably easy to resolve. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'crypto')
-rw-r--r--crypto/af_alg.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/crypto/af_alg.c b/crypto/af_alg.c
index 314c52c967e5..c166f424871c 100644
--- a/crypto/af_alg.c
+++ b/crypto/af_alg.c
@@ -1155,8 +1155,10 @@ int af_alg_get_rsgl(struct sock *sk, struct msghdr *msg, int flags,
/* make one iovec available as scatterlist */
err = af_alg_make_sg(&rsgl->sgl, &msg->msg_iter, seglen);
- if (err < 0)
+ if (err < 0) {
+ rsgl->sg_num_bytes = 0;
return err;
+ }
/* chain the new scatterlist with previous one */
if (areq->last_rsgl)