All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] [PPPOL2TP] Add missing sock_put() in pppol2tp_release()
@ 2008-11-27 16:18 Frédéric Moulins
  2008-11-29  6:13 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Frédéric Moulins @ 2008-11-27 16:18 UTC (permalink / raw)
  To: jchapman; +Cc: linux-kernel

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

Signed-off-by: Frédéric Moulins <frederic.moulins@alsatis.com>
---
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.

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

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-11-29  6:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-11-27 16:18 [PATCH] [PPPOL2TP] Add missing sock_put() in pppol2tp_release() Frédéric Moulins
2008-11-29  6:13 ` David Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.