]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
pppoe: fix reference counting in PPPoE proxy
authorGuillaume Nault <g.nault@alphalink.fr>
Mon, 15 Feb 2016 16:01:10 +0000 (17:01 +0100)
committerJiri Slaby <jslaby@suse.cz>
Wed, 2 Mar 2016 15:29:13 +0000 (16:29 +0100)
[ Upstream commit 29e73269aa4d36f92b35610c25f8b01c789b0dc8 ]

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>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
drivers/net/ppp/pppoe.c

index 1cfd4e841854e884b4fd364f178b3d371739862f..ec982788e6db0f206eac677634c6ff246a275174 100644 (file)
@@ -392,6 +392,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;