]> git.baikalelectronics.ru Git - kernel.git/commit
ipsec: Use RCU-like construct for saved state within a walk
authorHerbert Xu <herbert@gondor.apana.org.au>
Wed, 10 Sep 2008 02:58:29 +0000 (19:58 -0700)
committerDavid S. Miller <davem@davemloft.net>
Wed, 10 Sep 2008 02:58:29 +0000 (19:58 -0700)
commitda6ed1f9e1736509baee10d1a27b698c77d520fc
tree71a08df3a53eb9e19a62c673d77084e4d81f708b
parent1060dc92f2bbec3baeeed588ed8ac31f46274a69
ipsec: Use RCU-like construct for saved state within a walk

Now that we save states within a walk we need synchronisation
so that the list the saved state is on doesn't disappear from
under us.

As it stands this is done by keeping the state on the list which
is bad because it gets in the way of the management of the state
life-cycle.

An alternative is to make our own pseudo-RCU system where we use
counters to indicate which state can't be freed immediately as
it may be referenced by an ongoing walk when that resumes.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/xfrm.h
net/xfrm/xfrm_state.c