[patch 05/83] pppol2tp: Add missing sock_put() in pppol2tp_release()

Greg KH
2008-12-11T19:19:37Z

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: 0004-pppol2tp-Add-missing-sock_put-in-pppol2tp_release.patch --]
[-- Type: text/plain; charset=utf-8, Size: 694 bytes --]

2.6.27-stable review patch. If anyone has any objections, please let us know.

------------------

From: Frédéric Moulins <frederic.moulins@alsatis.com>

[ Upstream commit e6358135147807351db3b7782d3e198a1bba8b62 ]

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

Signed-off-by: Frederic Moulins <frederic.moulins@alsatis.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

---
drivers/net/pppol2tp.c | 1 +
1 file changed, 1 insertion(+)

--- a/drivers/net/pppol2tp.c
+++ b/drivers/net/pppol2tp.c
@@ -1353,6 +1353,7 @@ static int pppol2tp_release(struct socke
kfree_skb(skb);
sock_put(sk);
}
+ sock_put(sk);
}

release_sock(sk);