[IPSEC]: Move state lock into x->type->output
This patch releases the lock on the state before calling x->type->output. 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 <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
050f009e16
commit
b7c6538cd8
@@ -67,15 +67,15 @@ int xfrm_output(struct sk_buff *skb)
|
||||
if (err)
|
||||
goto error;
|
||||
|
||||
err = x->type->output(x, skb);
|
||||
if (err)
|
||||
goto error;
|
||||
|
||||
x->curlft.bytes += skb->len;
|
||||
x->curlft.packets++;
|
||||
|
||||
spin_unlock_bh(&x->lock);
|
||||
|
||||
err = x->type->output(x, skb);
|
||||
if (err)
|
||||
goto error_nolock;
|
||||
|
||||
if (!(skb->dst = dst_pop(dst))) {
|
||||
err = -EHOSTUNREACH;
|
||||
goto error_nolock;
|
||||
|
Reference in New Issue
Block a user