]> git.ipfire.org Git - thirdparty/kernel/stable.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>
Wed, 31 Aug 2022 15:18:01 +0000 (17:18 +0200)
commit6901885656c029c976498290b52f67f2c251e6a0
treefe0802bbc6286c8efb29fd0fa065f63fa03ca4e0
parent87b7ef9e760b50b3b2fbd76038ad1ca790094fe1
af_key: Do not call xfrm_probe_algs in parallel

[ Upstream commit ba953a9d89a00c078b85f4b190bc1dde66fe16b5 ]

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: 283bc9f35bbb ("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