Commit d7dceb58 authored by Jean-Philippe Sugarbroad's avatar Jean-Philippe Sugarbroad Committed by David S. Miller

[IPSEC]: Fix double unlock in esp/ah.

parent 7c9608de
...@@ -234,11 +234,12 @@ int ah_output(struct sk_buff *skb) ...@@ -234,11 +234,12 @@ int ah_output(struct sk_buff *skb)
x->curlft.packets++; x->curlft.packets++;
spin_unlock_bh(&x->lock); spin_unlock_bh(&x->lock);
if ((skb->dst = dst_pop(dst)) == NULL) if ((skb->dst = dst_pop(dst)) == NULL)
goto error; goto error_nolock;
return NET_XMIT_BYPASS; return NET_XMIT_BYPASS;
error: error:
spin_unlock_bh(&x->lock); spin_unlock_bh(&x->lock);
error_nolock:
kfree_skb(skb); kfree_skb(skb);
return err; return err;
} }
......
...@@ -435,11 +435,12 @@ int esp_output(struct sk_buff *skb) ...@@ -435,11 +435,12 @@ int esp_output(struct sk_buff *skb)
x->curlft.packets++; x->curlft.packets++;
spin_unlock_bh(&x->lock); spin_unlock_bh(&x->lock);
if ((skb->dst = dst_pop(dst)) == NULL) if ((skb->dst = dst_pop(dst)) == NULL)
goto error; goto error_nolock;
return NET_XMIT_BYPASS; return NET_XMIT_BYPASS;
error: error:
spin_unlock_bh(&x->lock); spin_unlock_bh(&x->lock);
error_nolock:
kfree_skb(skb); kfree_skb(skb);
return err; return err;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment