diff options
Diffstat (limited to 'net/xfrm/xfrm_state.c')
-rw-r--r-- | net/xfrm/xfrm_state.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/net/xfrm/xfrm_state.c b/net/xfrm/xfrm_state.c index 17d5b96f2fc8..5208b12fbfb4 100644 --- a/net/xfrm/xfrm_state.c +++ b/net/xfrm/xfrm_state.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <linux/audit.h> | 22 | #include <linux/audit.h> |
23 | #include <asm/uaccess.h> | 23 | #include <asm/uaccess.h> |
24 | #include <linux/ktime.h> | 24 | #include <linux/ktime.h> |
25 | #include <linux/slab.h> | ||
25 | #include <linux/interrupt.h> | 26 | #include <linux/interrupt.h> |
26 | #include <linux/kernel.h> | 27 | #include <linux/kernel.h> |
27 | 28 | ||
@@ -37,7 +38,6 @@ | |||
37 | static DEFINE_SPINLOCK(xfrm_state_lock); | 38 | static DEFINE_SPINLOCK(xfrm_state_lock); |
38 | 39 | ||
39 | static unsigned int xfrm_state_hashmax __read_mostly = 1 * 1024 * 1024; | 40 | static unsigned int xfrm_state_hashmax __read_mostly = 1 * 1024 * 1024; |
40 | static unsigned int xfrm_state_genid; | ||
41 | 41 | ||
42 | static struct xfrm_state_afinfo *xfrm_state_get_afinfo(unsigned int family); | 42 | static struct xfrm_state_afinfo *xfrm_state_get_afinfo(unsigned int family); |
43 | static void xfrm_state_put_afinfo(struct xfrm_state_afinfo *afinfo); | 43 | static void xfrm_state_put_afinfo(struct xfrm_state_afinfo *afinfo); |
@@ -923,8 +923,6 @@ static void __xfrm_state_insert(struct xfrm_state *x) | |||
923 | struct net *net = xs_net(x); | 923 | struct net *net = xs_net(x); |
924 | unsigned int h; | 924 | unsigned int h; |
925 | 925 | ||
926 | x->genid = ++xfrm_state_genid; | ||
927 | |||
928 | list_add(&x->km.all, &net->xfrm.state_all); | 926 | list_add(&x->km.all, &net->xfrm.state_all); |
929 | 927 | ||
930 | h = xfrm_dst_hash(net, &x->id.daddr, &x->props.saddr, | 928 | h = xfrm_dst_hash(net, &x->id.daddr, &x->props.saddr, |
@@ -970,7 +968,7 @@ static void __xfrm_state_bump_genids(struct xfrm_state *xnew) | |||
970 | (mark & x->mark.m) == x->mark.v && | 968 | (mark & x->mark.m) == x->mark.v && |
971 | !xfrm_addr_cmp(&x->id.daddr, &xnew->id.daddr, family) && | 969 | !xfrm_addr_cmp(&x->id.daddr, &xnew->id.daddr, family) && |
972 | !xfrm_addr_cmp(&x->props.saddr, &xnew->props.saddr, family)) | 970 | !xfrm_addr_cmp(&x->props.saddr, &xnew->props.saddr, family)) |
973 | x->genid = xfrm_state_genid; | 971 | x->genid++; |
974 | } | 972 | } |
975 | } | 973 | } |
976 | 974 | ||