Loading
!15080 [OLK-6.6] crypto: zhaoxin - Fix incorrect parameter in sm4 driver
Merge Pull Request from: @leoliu-oc
1. crypto: zhaoxin - Fix incorrect parameter in sm4 driver
The prior patch("crypto: simd - Do not call crypto_alloc_tfm during registration") had an error in arch/x86/crypto/sm4-zhaoxin-gmi.c.
It should pass 'sm4_algs + i' to 'simd_skcipher_create_compat', like other changes, instead of 'sm4_algs'.
Passing the wrong param made 'simd_skcipher_create_compat' always get the start address of 'sm4_algs', not the right struct pointer in the loop, risking logic errors.
This patch fixes it by changing the 'simd_skcipher_create_compat' call to use 'sm4_algs + i' as the first arg.
### Issue
https://gitee.com/openeuler/kernel/issues/IBMDJH
### Default config change
N/A
### Test
Pass
Link:https://gitee.com/openeuler/kernel/pulls/15080
Reviewed-by:
Zhang Peng <zhangpeng362@huawei.com>
Signed-off-by:
Zhang Peng <zhangpeng362@huawei.com>