]> git.baikalelectronics.ru Git - kernel.git/commit
crypto: ccree - rearrange init calls to avoid race
authorGilad Ben-Yossef <gilad@benyossef.com>
Wed, 6 Apr 2022 08:11:38 +0000 (11:11 +0300)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 15 Apr 2022 08:34:25 +0000 (16:34 +0800)
commit2d5402b06fb57f980f5c77d22ceb443e3a371b45
tree7d58004ed88424db214da90a2305cc1bebb2bd04
parent6918340759bba6ca8f9ddc74af67ae97e00a3b08
crypto: ccree - rearrange init calls to avoid race

Rearrange init calls to avoid the rare race condition of
the cipher algs being registered and used while we still
init the hash code which uses the HW without proper lock.

Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com>
Reported-by: Dung Nguyen <dung.nguyen.zy@renesas.com>
Tested-by: Jing Dan <jing.dan.nx@renesas.com>
Tested-by: Dung Nguyen <dung.nguyen.zy@renesas.com>
Fixes: 98b24bf20b29("crypto: ccree - add ahash support")
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/ccree/cc_driver.c