aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/pppol2tp.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/pppol2tp.c')
-rw-r--r--drivers/net/pppol2tp.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/net/pppol2tp.c b/drivers/net/pppol2tp.c
index e0b072d9fdb7..86e5dba079fe 100644
--- a/drivers/net/pppol2tp.c
+++ b/drivers/net/pppol2tp.c
@@ -455,6 +455,7 @@ static void pppol2tp_recv_dequeue(struct pppol2tp_session *session)
455 skb_queue_len(&session->reorder_q)); 455 skb_queue_len(&session->reorder_q));
456 __skb_unlink(skb, &session->reorder_q); 456 __skb_unlink(skb, &session->reorder_q);
457 kfree_skb(skb); 457 kfree_skb(skb);
458 sock_put(session->sock);
458 continue; 459 continue;
459 } 460 }
460 461
@@ -1110,6 +1111,8 @@ static void pppol2tp_tunnel_closeall(struct pppol2tp_tunnel *tunnel)
1110 for (hash = 0; hash < PPPOL2TP_HASH_SIZE; hash++) { 1111 for (hash = 0; hash < PPPOL2TP_HASH_SIZE; hash++) {
1111again: 1112again:
1112 hlist_for_each_safe(walk, tmp, &tunnel->session_hlist[hash]) { 1113 hlist_for_each_safe(walk, tmp, &tunnel->session_hlist[hash]) {
1114 struct sk_buff *skb;
1115
1113 session = hlist_entry(walk, struct pppol2tp_session, hlist); 1116 session = hlist_entry(walk, struct pppol2tp_session, hlist);
1114 1117
1115 sk = session->sock; 1118 sk = session->sock;
@@ -1138,7 +1141,10 @@ again:
1138 /* Purge any queued data */ 1141 /* Purge any queued data */
1139 skb_queue_purge(&sk->sk_receive_queue); 1142 skb_queue_purge(&sk->sk_receive_queue);
1140 skb_queue_purge(&sk->sk_write_queue); 1143 skb_queue_purge(&sk->sk_write_queue);
1141 skb_queue_purge(&session->reorder_q); 1144 while ((skb = skb_dequeue(&session->reorder_q))) {
1145 kfree_skb(skb);
1146 sock_put(sk);
1147 }
1142 1148
1143 release_sock(sk); 1149 release_sock(sk);
1144 sock_put(sk); 1150 sock_put(sk);