Skip to content

Commit

Permalink
Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
Browse files Browse the repository at this point in the history
* git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6:
  [CRYPTO] cts: Init SG tables
  • Loading branch information
Linus Torvalds committed Jun 2, 2008
2 parents 28928b2 + c4913c7 commit c3b25b3
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions crypto/cts.c
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,9 @@ static int cts_cbc_encrypt(struct crypto_cts_ctx *ctx,
if (lastn < 0)
return -EINVAL;

sg_init_table(sgsrc, 1);
sg_init_table(sgdst, 1);

memset(s, 0, sizeof(s));
scatterwalk_map_and_copy(s, src, offset, nbytes, 0);

Expand Down Expand Up @@ -172,6 +175,9 @@ static int cts_cbc_decrypt(struct crypto_cts_ctx *ctx,
if (lastn < 0)
return -EINVAL;

sg_init_table(sgsrc, 1);
sg_init_table(sgdst, 1);

scatterwalk_map_and_copy(s, src, offset, nbytes, 0);

lcldesc.tfm = ctx->child;
Expand Down

0 comments on commit c3b25b3

Please sign in to comment.