mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
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 <[email protected]>
This commit is contained in:
parent
283bc9f35b
commit
5b8ef3415a
4 changed files with 5 additions and 44 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue