crypto: caam - Clear some memory in instantiate_rng
stable inclusion from stable-v5.10.180 commit de3908e1515224b0e65cdfbe246eda933be3cdbf category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I8DDFN Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=de3908e1515224b0e65cdfbe246eda933be3cdbf -------------------------------- [ Upstream commit 9c19fb86 ] According to the comment at the end of the 'for' loop just a few lines below, it looks needed to clear 'desc'. So it should also be cleared for the first iteration. Move the memset() to the beginning of the loop to be safe. Fixes: 281922a1 ("crypto: caam - add support for SEC v5.x RNG4") Signed-off-by:Christophe JAILLET <christophe.jaillet@wanadoo.fr> Reviewed-by:
Gaurav Jain <gaurav.jain@nxp.com> Signed-off-by:
Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by:
Sasha Levin <sashal@kernel.org> Signed-off-by:
sanglipeng <sanglipeng1@jd.com>
Loading
Please sign in to comment