]> git.baikalelectronics.ru Git - kernel.git/commit
af_key: Do not call xfrm_probe_algs in parallel
authorHerbert Xu <herbert@gondor.apana.org.au>
Thu, 4 Aug 2022 10:03:46 +0000 (18:03 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 5 Sep 2022 08:27:40 +0000 (10:27 +0200)
commitc573b4b84d9ff92fcd348520fd3a9e983be5e342
treecaf4aaf23d35846018ae03e55fdde4bcbbdc2f78
parent73d4cfe7a8142cb8de7c1902e57fb333ca7d22fc
af_key: Do not call xfrm_probe_algs in parallel

[ Upstream commit 1e435d5c2128d51c87b3b9cf82b86dc7cf9e1552 ]

When namespace support was added to xfrm/afkey, it caused the
previously single-threaded call to xfrm_probe_algs to become
multi-threaded.  This is buggy and needs to be fixed with a mutex.

Reported-by: Abhishek Shah <abhishek.shah@columbia.edu>
Fixes: 4cf003d9ee99 ("xfrm: Namespacify xfrm state/policy locks")
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/key/af_key.c