aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorPavel Emelyanov <xemul@openvz.org>2007-11-20 01:51:24 -0500
committerDavid S. Miller <davem@davemloft.net>2007-11-20 01:51:24 -0500
commit1f8170b0ecd8363847792b3b1f269e9d8e10391a (patch)
tree5b95a155c43486007e83ead6e7d76c8c6b9d089e /net
parent9055fa1f3ded5ad858a55ae18439ed55227ee7eb (diff)
[PKTGEN]: Fix double unlock of xfrm_state->lock
The pktgen_output_ipsec() function can unlock this lock twice due to merged error and plain paths. Remove one of the calls to spin_unlock. Other possible solution would be to place "return 0" right after the first unlock, but at this place the err is known to be 0, so these solutions are the same except for this one makes the code shorter. Signed-off-by: Pavel Emelyanov <xemul@openvz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r--net/core/pktgen.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/net/core/pktgen.c b/net/core/pktgen.c
index de33f36947e9..285ec3ed9b37 100644
--- a/net/core/pktgen.c
+++ b/net/core/pktgen.c
@@ -2463,8 +2463,6 @@ static int pktgen_output_ipsec(struct sk_buff *skb, struct pktgen_dev *pkt_dev)
2463 2463
2464 x->curlft.bytes +=skb->len; 2464 x->curlft.bytes +=skb->len;
2465 x->curlft.packets++; 2465 x->curlft.packets++;
2466 spin_unlock(&x->lock);
2467
2468error: 2466error:
2469 spin_unlock(&x->lock); 2467 spin_unlock(&x->lock);
2470 return err; 2468 return err;