diff options
author | Lars Persson <lars.persson@axis.com> | 2015-08-25 05:59:15 -0400 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2015-08-25 09:13:20 -0400 |
commit | bf433416e67597ba105ece55b3136557874945db (patch) | |
tree | a1dda9973c73ba88e203c931e77c6b4f51eb877e | |
parent | df9e21e100a65618b56971ec8da4975eb60e919d (diff) |
crypto: algif_aead - fix for multiple operations on AF_ALG sockets
The tsgl scatterlist must be re-initialized after each
operation. Otherwise the sticky bits in the page_link will corrupt the
list with pre-mature termination or false chaining.
Signed-off-by: Lars Persson <larper@axis.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
-rw-r--r-- | crypto/algif_aead.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/crypto/algif_aead.c b/crypto/algif_aead.c index 38a6cab7aeca..0aa6fdfb448a 100644 --- a/crypto/algif_aead.c +++ b/crypto/algif_aead.c | |||
@@ -90,6 +90,7 @@ static void aead_put_sgl(struct sock *sk) | |||
90 | put_page(sg_page(sg + i)); | 90 | put_page(sg_page(sg + i)); |
91 | sg_assign_page(sg + i, NULL); | 91 | sg_assign_page(sg + i, NULL); |
92 | } | 92 | } |
93 | sg_init_table(sg, ALG_MAX_PAGES); | ||
93 | sgl->cur = 0; | 94 | sgl->cur = 0; |
94 | ctx->used = 0; | 95 | ctx->used = 0; |
95 | ctx->more = 0; | 96 | ctx->more = 0; |