aboutsummaryrefslogtreecommitdiffstats
path: root/include/net
diff options
context:
space:
mode:
authorAlexey Dobriyan <adobriyan@gmail.com>2008-11-25 20:21:01 -0500
committerDavid S. Miller <davem@davemloft.net>2008-11-25 20:21:01 -0500
commit50a30657fd7ee77a94a6bf0ad86eba7c37c3032e (patch)
tree7eb9165881b9082588eb2c373e9ed2ebc013321e /include/net
parentc78371441c0d957f54c9f8a35b3ee5a378d14808 (diff)
netns xfrm: per-netns km_waitq
Disallow spurious wakeups in __xfrm_lookup(). Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net')
-rw-r--r--include/net/netns/xfrm.h3
-rw-r--r--include/net/xfrm.h1
2 files changed, 3 insertions, 1 deletions
diff --git a/include/net/netns/xfrm.h b/include/net/netns/xfrm.h
index 80555351fe5e..2a383c8ba1af 100644
--- a/include/net/netns/xfrm.h
+++ b/include/net/netns/xfrm.h
@@ -2,6 +2,7 @@
2#define __NETNS_XFRM_H 2#define __NETNS_XFRM_H
3 3
4#include <linux/list.h> 4#include <linux/list.h>
5#include <linux/wait.h>
5#include <linux/workqueue.h> 6#include <linux/workqueue.h>
6 7
7struct netns_xfrm { 8struct netns_xfrm {
@@ -22,6 +23,8 @@ struct netns_xfrm {
22 struct work_struct state_hash_work; 23 struct work_struct state_hash_work;
23 struct hlist_head state_gc_list; 24 struct hlist_head state_gc_list;
24 struct work_struct state_gc_work; 25 struct work_struct state_gc_work;
26
27 wait_queue_head_t km_waitq;
25}; 28};
26 29
27#endif 30#endif
diff --git a/include/net/xfrm.h b/include/net/xfrm.h
index 9da89039832c..0d4353c11093 100644
--- a/include/net/xfrm.h
+++ b/include/net/xfrm.h
@@ -1459,7 +1459,6 @@ extern int xfrm_migrate(struct xfrm_selector *sel, u8 dir, u8 type,
1459 struct xfrm_kmaddress *k); 1459 struct xfrm_kmaddress *k);
1460#endif 1460#endif
1461 1461
1462extern wait_queue_head_t km_waitq;
1463extern int km_new_mapping(struct xfrm_state *x, xfrm_address_t *ipaddr, __be16 sport); 1462extern int km_new_mapping(struct xfrm_state *x, xfrm_address_t *ipaddr, __be16 sport);
1464extern void km_policy_expired(struct xfrm_policy *pol, int dir, int hard, u32 pid); 1463extern void km_policy_expired(struct xfrm_policy *pol, int dir, int hard, u32 pid);
1465extern int km_report(u8 proto, struct xfrm_selector *sel, xfrm_address_t *addr); 1464extern int km_report(u8 proto, struct xfrm_selector *sel, xfrm_address_t *addr);