]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
crypto: picoxcell - Fix potential race condition bug
authorMadhuparna Bhowmik <madhuparnabhowmik10@gmail.com>
Tue, 11 Aug 2020 12:30:24 +0000 (18:00 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 29 Oct 2020 09:07:17 +0000 (10:07 +0100)
commit0ebbe42a9a4c9da9ef291ccc997636a306f9ff83
treeafd387ade962c54bdd5b46da229ee4e3422889b5
parent5ec044fb819d258579d71071b971926e85646d73
crypto: picoxcell - Fix potential race condition bug

[ Upstream commit 64f4a62e3b17f1e473f971127c2924cae42afc82 ]

engine->stat_irq_thresh was initialized after device_create_file() in
the probe function, the initialization may race with call to
spacc_stat_irq_thresh_store() which updates engine->stat_irq_thresh,
therefore initialize it before creating the file in probe function.

Found by Linux Driver Verification project (linuxtesting.org).

Fixes: ce92136843cb ("crypto: picoxcell - add support for the...")
Signed-off-by: Madhuparna Bhowmik <madhuparnabhowmik10@gmail.com>
Acked-by: Jamie Iles <jamie@jamieiles.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/crypto/picoxcell_crypto.c