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)
committerSteffen Klassert <steffen.klassert@secunet.com>
Fri, 5 Aug 2022 08:22:14 +0000 (10:22 +0200)
commitba953a9d89a00c078b85f4b190bc1dde66fe16b5
tree6545950098ca9ffbab9ff4c0e48f6c6abcf6313b
parent6aa811acdb76facca0b705f4e4c1d948ccb6af8b
af_key: Do not call xfrm_probe_algs in parallel

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>
net/key/af_key.c