netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net] pppoe: fix reference counting in PPPoE proxy
@ 2016-02-15 16:01 Guillaume Nault
  2016-02-17 21:03 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Guillaume Nault @ 2016-02-15 16:01 UTC (permalink / raw)
  To: netdev; +Cc: David Miller

Drop reference on the relay_po socket when __pppoe_xmit() succeeds.
This is already handled correctly in the error path.

Signed-off-by: Guillaume Nault <g.nault@alphalink.fr>
---
No 'Fixes' tag, since this issue seems to predate git's history.

 drivers/net/ppp/pppoe.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/ppp/pppoe.c b/drivers/net/ppp/pppoe.c
index f3c6302..4ddae81 100644
--- a/drivers/net/ppp/pppoe.c
+++ b/drivers/net/ppp/pppoe.c
@@ -395,6 +395,8 @@ static int pppoe_rcv_core(struct sock *sk, struct sk_buff *skb)
 
 		if (!__pppoe_xmit(sk_pppox(relay_po), skb))
 			goto abort_put;
+
+		sock_put(sk_pppox(relay_po));
 	} else {
 		if (sock_queue_rcv_skb(sk, skb))
 			goto abort_kfree;
-- 
2.7.0

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

* Re: [PATCH net] pppoe: fix reference counting in PPPoE proxy
  2016-02-15 16:01 [PATCH net] pppoe: fix reference counting in PPPoE proxy Guillaume Nault
@ 2016-02-17 21:03 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2016-02-17 21:03 UTC (permalink / raw)
  To: g.nault; +Cc: netdev

From: Guillaume Nault <g.nault@alphalink.fr>
Date: Mon, 15 Feb 2016 17:01:10 +0100

> Drop reference on the relay_po socket when __pppoe_xmit() succeeds.
> This is already handled correctly in the error path.
> 
> Signed-off-by: Guillaume Nault <g.nault@alphalink.fr>
> ---
> No 'Fixes' tag, since this issue seems to predate git's history.

Hard to believe that such an obvious leak has existed for so long.

Applied, and queued up for -stable, thanks!

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

end of thread, other threads:[~2016-02-17 21:03 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-15 16:01 [PATCH net] pppoe: fix reference counting in PPPoE proxy Guillaume Nault
2016-02-17 21:03 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).