Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 361792
b: refs/heads/master
c: 9360631
h: refs/heads/master
v: v3
  • Loading branch information
Tom Parkin authored and David S. Miller committed Mar 20, 2013
1 parent 4441a32 commit 8c2fb80
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: e34f4c7050e5471b6d4fb25380713937fc837514
refs/heads/master: 936063175afd895913a5e9db77e1a0ef43ea44ea
6 changes: 6 additions & 0 deletions trunk/net/l2tp/l2tp_ip.c
Original file line number Diff line number Diff line change
Expand Up @@ -228,10 +228,16 @@ static void l2tp_ip_close(struct sock *sk, long timeout)
static void l2tp_ip_destroy_sock(struct sock *sk)
{
struct sk_buff *skb;
struct l2tp_tunnel *tunnel = l2tp_sock_to_tunnel(sk);

while ((skb = __skb_dequeue_tail(&sk->sk_write_queue)) != NULL)
kfree_skb(skb);

if (tunnel) {
l2tp_tunnel_closeall(tunnel);
sock_put(sk);
}

sk_refcnt_debug_dec(sk);
}

Expand Down
7 changes: 7 additions & 0 deletions trunk/net/l2tp/l2tp_ip6.c
Original file line number Diff line number Diff line change
Expand Up @@ -241,10 +241,17 @@ static void l2tp_ip6_close(struct sock *sk, long timeout)

static void l2tp_ip6_destroy_sock(struct sock *sk)
{
struct l2tp_tunnel *tunnel = l2tp_sock_to_tunnel(sk);

lock_sock(sk);
ip6_flush_pending_frames(sk);
release_sock(sk);

if (tunnel) {
l2tp_tunnel_closeall(tunnel);
sock_put(sk);
}

inet6_destroy_sock(sk);
}

Expand Down

0 comments on commit 8c2fb80

Please sign in to comment.