summaryrefslogtreecommitdiffstats
path: root/net/key
diff options
context:
space:
mode:
authorSteffen Klassert <steffen.klassert@secunet.com>2013-08-27 13:43:30 +0200
committerSteffen Klassert <steffen.klassert@secunet.com>2013-12-06 07:24:31 +0100
commit5b8ef3415a21f173ab115e90ec92c071a03f22d7 (patch)
treebb78d47430f22c24030375aeb2b358d8e38ddd18 /net/key
parentxfrm: Namespacify xfrm state/policy locks (diff)
downloadlinux-5b8ef3415a21f173ab115e90ec92c071a03f22d7.tar.xz
linux-5b8ef3415a21f173ab115e90ec92c071a03f22d7.zip
xfrm: Remove ancient sleeping when the SA is in acquire state
We now queue packets to the policy if the states are not yet resolved, this replaces the ancient sleeping code. Also the sleeping can cause indefinite task hangs if the needed state does not get resolved. Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Diffstat (limited to 'net/key')
-rw-r--r--net/key/af_key.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/net/key/af_key.c b/net/key/af_key.c
index 9a039acf37e8..5beabd8ba772 100644
--- a/net/key/af_key.c
+++ b/net/key/af_key.c
@@ -1380,10 +1380,9 @@ static int pfkey_acquire(struct sock *sk, struct sk_buff *skb, const struct sadb
return 0;
spin_lock_bh(&x->lock);
- if (x->km.state == XFRM_STATE_ACQ) {
+ if (x->km.state == XFRM_STATE_ACQ)
x->km.state = XFRM_STATE_ERROR;
- wake_up(&net->xfrm.km_waitq);
- }
+
spin_unlock_bh(&x->lock);
xfrm_state_put(x);
return 0;