Skip to content

Commit

Permalink
crypto: algif_aead - fix for multiple operations on AF_ALG sockets
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Lars Persson authored and Herbert Xu committed Aug 25, 2015
1 parent df9e21e commit bf43341
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions crypto/algif_aead.c
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ static void aead_put_sgl(struct sock *sk)
put_page(sg_page(sg + i));
sg_assign_page(sg + i, NULL);
}
sg_init_table(sg, ALG_MAX_PAGES);
sgl->cur = 0;
ctx->used = 0;
ctx->more = 0;
Expand Down

0 comments on commit bf43341

Please sign in to comment.