Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 12604d8a authored by Alexey Dobriyan's avatar Alexey Dobriyan Committed by David S. Miller
Browse files

netns xfrm: fixup xfrm_alloc_spi()

parent 221df1ed
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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;