linux/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 ipsec: ipcomp - Merge IPComp implementations 2008-07-25 02:54:40 -07:00
Makefile netns xfrm: per-netns sysctls 2008-11-25 18:00:48 -08:00
xfrm_algo.c crypto: gcm - Add RFC4543 wrapper for GCM 2010-01-17 21:52:11 +11:00
xfrm_hash.c [IPSEC]: kmalloc + memset conversion to kzalloc 2008-01-28 14:55:05 -08:00
xfrm_hash.h Fix xfrm hash collisions by changing __xfrm4_daddr_saddr_hash to hash addresses with addition 2009-08-09 21:45:31 -07:00
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 net: skb->dst accessors 2009-06-03 02:51:04 -07:00
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