Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932728AbcCBBW7 (ORCPT ); Tue, 1 Mar 2016 20:22:59 -0500 Received: from mail177-1.suw61.mandrillapp.com ([198.2.177.1]:43852 "EHLO mail177-1.suw61.mandrillapp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755515AbcCAXzY (ORCPT ); Tue, 1 Mar 2016 18:55:24 -0500 From: Greg Kroah-Hartman Subject: [PATCH 4.4 039/342] pppoe: fix reference counting in PPPoE proxy X-Mailer: git-send-email 2.7.2 To: Cc: Greg Kroah-Hartman , , Guillaume Nault , "David S. Miller" Message-Id: <20160301234529.238001699@linuxfoundation.org> In-Reply-To: <20160301234527.990448862@linuxfoundation.org> References: <20160301234527.990448862@linuxfoundation.org> X-Report-Abuse: Please forward a copy of this message, including all headers, to abuse@mandrill.com X-Report-Abuse: You can also report abuse here: http://mandrillapp.com/contact/abuse?id=30481620.c544cc7e39514fed88f25d1acbf28424 X-Mandrill-User: md_30481620 Date: Tue, 01 Mar 2016 23:54:11 +0000 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 864 Lines: 29 4.4-stable review patch. If anyone has any objections, please let me know. ------------------ From: Guillaume Nault [ 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 Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- drivers/net/ppp/pppoe.c | 2 ++ 1 file changed, 2 insertions(+) --- a/drivers/net/ppp/pppoe.c +++ b/drivers/net/ppp/pppoe.c @@ -395,6 +395,8 @@ static int pppoe_rcv_core(struct sock *s 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;