mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -04:00
[IPSEC]: Move state lock into x->type->input
This patch releases the lock on the state before calling x->type->input. It also adds the lock to the spots where they're currently needed. Most of those places (all except mip6) are expected to disappear with async crypto. Signed-off-by: Herbert Xu <[email protected]> Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
parent
668dc8af31
commit
0ebea8ef35
6 changed files with 69 additions and 33 deletions
|
|
@ -146,7 +146,11 @@ int xfrm_input(struct sk_buff *skb, int nexthdr, __be32 spi, int encap_type)
|
|||
if (xfrm_state_check_expire(x))
|
||||
goto drop_unlock;
|
||||
|
||||
spin_unlock(&x->lock);
|
||||
|
||||
nexthdr = x->type->input(x, skb);
|
||||
|
||||
spin_lock(&x->lock);
|
||||
if (nexthdr <= 0) {
|
||||
if (nexthdr == -EBADMSG)
|
||||
x->stats.integrity_failed++;
|
||||
|
|
|
|||
Loading…
Reference in a new issue