Skip to content

Commit c3b25b3

Browse files
committed
Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: [CRYPTO] cts: Init SG tables
2 parents 28928b2 + c4913c7 commit c3b25b3

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

crypto/cts.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,9 @@ static int cts_cbc_encrypt(struct crypto_cts_ctx *ctx,
8989
if (lastn < 0)
9090
return -EINVAL;
9191

92+
sg_init_table(sgsrc, 1);
93+
sg_init_table(sgdst, 1);
94+
9295
memset(s, 0, sizeof(s));
9396
scatterwalk_map_and_copy(s, src, offset, nbytes, 0);
9497

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

178+
sg_init_table(sgsrc, 1);
179+
sg_init_table(sgdst, 1);
180+
175181
scatterwalk_map_and_copy(s, src, offset, nbytes, 0);
176182

177183
lcldesc.tfm = ctx->child;

0 commit comments

Comments
 (0)