Skip to content

Commit 94de8a3

Browse files
Harsha Harshamichalsimek
authored andcommitted
drivers: crypto: xilinx: Fix the request size
Fix the request size to include the size required for fallback cipher. Signed-off-by: Harsha Harsha <harsha.harsha@amd.com>
1 parent d81f50b commit 94de8a3

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

drivers/crypto/xilinx/xilinx-rsa.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -394,7 +394,9 @@ static int xilinx_rsa_init(struct crypto_akcipher *tfm)
394394
return PTR_ERR(tfm_ctx->fbk_cipher);
395395
}
396396

397-
akcipher_set_reqsize(tfm, sizeof(struct xilinx_rsa_req_ctx));
397+
akcipher_set_reqsize(tfm, max(sizeof(struct xilinx_rsa_req_ctx),
398+
sizeof(struct akcipher_request) +
399+
crypto_akcipher_reqsize(tfm_ctx->fbk_cipher)));
398400

399401
return 0;
400402
}

0 commit comments

Comments
 (0)