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>
This commit is contained in:
Alexey Dobriyan
2008-11-25 17:21:01 -08:00
committed by David S. Miller
parent c78371441c
commit 50a30657fd
5 changed files with 13 additions and 13 deletions

View File

@@ -1411,7 +1411,7 @@ static int pfkey_acquire(struct sock *sk, struct sk_buff *skb, struct sadb_msg *
spin_lock_bh(&x->lock);
if (x->km.state == XFRM_STATE_ACQ) {
x->km.state = XFRM_STATE_ERROR;
wake_up(&km_waitq);
wake_up(&init_net.xfrm.km_waitq);
}
spin_unlock_bh(&x->lock);
xfrm_state_put(x);