From: Alexey Dobriyan Date: Wed, 26 Nov 2008 01:31:18 +0000 (-0800) Subject: netns xfrm: fixup xfrm_alloc_spi() X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=12604d8aaa38ac4e24299c9803fefdb301a16421;p=linux-beck.git netns xfrm: fixup xfrm_alloc_spi() Signed-off-by: Alexey Dobriyan Signed-off-by: David S. Miller --- diff --git a/net/xfrm/xfrm_state.c b/net/xfrm/xfrm_state.c index afde47498cdc..cd51e4e3d023 100644 --- a/net/xfrm/xfrm_state.c +++ b/net/xfrm/xfrm_state.c @@ -1527,8 +1527,8 @@ int xfrm_alloc_spi(struct xfrm_state *x, u32 low, u32 high) } if (x->id.spi) { spin_lock_bh(&xfrm_state_lock); - h = xfrm_spi_hash(&init_net, &x->id.daddr, x->id.spi, x->id.proto, x->props.family); - hlist_add_head(&x->byspi, init_net.xfrm.state_byspi+h); + h = xfrm_spi_hash(net, &x->id.daddr, x->id.spi, x->id.proto, x->props.family); + hlist_add_head(&x->byspi, net->xfrm.state_byspi+h); spin_unlock_bh(&xfrm_state_lock); err = 0;