Loading
crypto: zhaoxin - Fix incorrect parameter in sm4 driver
zhaoxin inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/IBMDJH CVE: NA ------------------- 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. Fixes: 922cc13a ("crypto: simd - Do not call crypto_alloc_tfm during registration") Signed-off-by:LeoLiu-oc <leoliu-oc@zhaoxin.com>