WSL2-Linux-Kernel/net/xfrm
Timo Teräs ea2dea9dac xfrm: remove policy lock when accessing policy->walk.dead
All of the code considers ->dead as a hint that the cached policy
needs to get refreshed. The read side can just drop the read lock
without any side effects.

The write side needs to make sure that it's written only exactly
once. Only possible race is at xfrm_policy_kill(). This is fixed
by checking result of __xfrm_policy_unlink() when needed. It will
always succeed if the policy object is looked up from the hash
list (so some checks are removed), but it needs to be checked if
we are trying to unlink policy via a reference (appropriate
checks added).

Since policy->walk.dead is written exactly once, it no longer
needs to be protected with a write lock.

Signed-off-by: Timo Teras <timo.teras@iki.fi>
Acked-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-04-01 19:41:35 -07:00
..
Kconfig
Makefile
xfrm_algo.c crypto: gcm - Add RFC4543 wrapper for GCM 2010-01-17 21:52:11 +11:00
xfrm_hash.c
xfrm_hash.h
xfrm_input.c xfrm: SA lookups signature with mark 2010-02-22 16:20:22 -08:00
xfrm_ipcomp.c percpu: add __percpu sparse annotations to net 2010-02-16 23:05:38 -08:00
xfrm_output.c
xfrm_policy.c xfrm: remove policy lock when accessing policy->walk.dead 2010-04-01 19:41:35 -07:00
xfrm_proc.c xfrm: Introduce LINUX_MIB_XFRMFWDHDRERROR 2010-02-18 15:43:09 -08:00
xfrm_state.c xfrm: Remove xfrm_state_genid 2010-04-01 19:41:34 -07:00
xfrm_sysctl.c net: spread __net_init, __net_exit 2010-01-17 19:16:02 -08:00
xfrm_user.c xfrm: remove policy lock when accessing policy->walk.dead 2010-04-01 19:41:35 -07:00