Skip to contentSkip to conversation

Add missing sock_put() in pppol2tp_release()

PATCH Applied Frédéric Moulins 2 participants 2 messages Nov 27, 2008 – Nov 29, 2008

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Add missing sock_put() in pppol2tp_release()

pppol2tp_sock_to_session() do sock_hold() if the session to release is not NULL.

---
Patch is applicable to kernels 2.6.26 and following.

Tested with a 2.6.26 stable kernel:
without this patch, a session in a persistent tunnel cannot be established again (connect failed: -17), and the pppol2tp kernel module cannot be removed because still considered in use after stopping all userspace daemons.

drivers/net/pppol2tp.c +1 -0
index ff175e8..de80ba4 100644
@@ -1353,6 +1353,7 @@ static int pppol2tp_release(struct socket *sock)
 			kfree_skb(skb);
 			sock_put(sk);
 		}
+		sock_put(sk);
 	}
 
 	release_sock(sk);
maintainer Applied
#1 lore raw

From: Frédéric Moulins <[email protected]>
Date: Thu, 27 Nov 2008 17:18:51 +0100

Quoted 4 lines

pppol2tp_sock_to_session() do sock_hold() if the session to release is not NULL.

Applied, but please post networking patches at least CC:'d to [email protected] so that your work gets properly tracked at:

http://patchwork.ozlabs.org/project/netdev/list

Thanks.

Quoted 26 lines

---
Patch is applicable to kernels 2.6.26 and following.

Tested with a 2.6.26 stable kernel:
without this patch, a session in a persistent tunnel cannot be established again (connect failed: -17), and the pppol2tp kernel module cannot be removed because still considered in use after stopping all userspace daemons.

drivers/net/pppol2tp.c +1 -1
index ff175e8..de80ba4 100644
@@ -1353,6 +1353,7 @@ static int pppol2tp_release(struct socket *sock)
 			kfree_skb(skb);
 			sock_put(sk);
 		}
+		sock_put(sk);
 	}
 
 	release_sock(sk);
--

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/