Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ef089d9b authored by Christoph Manszewski's avatar Christoph Manszewski Committed by Greg Kroah-Hartman
Browse files

crypto: s5p-sss: Fix race in error handling



[ Upstream commit 5842cd44786055231b233ed5ed98cdb63ffb7db3 ]

Remove a race condition introduced by error path in functions:
s5p_aes_interrupt and s5p_aes_crypt_start. Setting the busy field of
struct s5p_aes_dev to false made it possible for s5p_tasklet_cb to
change the req field, before s5p_aes_complete was called.

Change the first parameter of s5p_aes_complete to struct
ablkcipher_request. Before spin_unlock, make a copy of the currently
handled request, to ensure s5p_aes_complete function call with the
correct request.

Signed-off-by: default avatarChristoph Manszewski <c.manszewski@samsung.com>
Acked-by: default avatarKamil Konieczny <k.konieczny@partner.samsung.com>
Reviewed-by: default avatarKrzysztof Kozlowski <krzk@kernel.org>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent d34465e7
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment