Return-Path: Received: from mail-by2nam03on0106.outbound.protection.outlook.com ([104.47.42.106]:32336 "EHLO NAM03-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754848AbeARVGb (ORCPT ); Thu, 18 Jan 2018 16:06:31 -0500 From: Sasha Levin To: "stable@vger.kernel.org" , "stable-commits@vger.kernel.org" CC: Gao Feng , "David S . Miller" , Sasha Levin Subject: [added to the 4.1 stable tree] ppp: Destroy the mutex when cleanup Date: Thu, 18 Jan 2018 21:01:47 +0000 Message-ID: <20180118205908.3220-268-alexander.levin@microsoft.com> References: <20180118205908.3220-1-alexander.levin@microsoft.com> In-Reply-To: <20180118205908.3220-1-alexander.levin@microsoft.com> Content-Language: en-US Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org List-ID: From: Gao Feng This patch has been added to the stable tree. If you have any objections, please let us know. =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D [ Upstream commit f02b2320b27c16b644691267ee3b5c110846f49e ] The mutex_destroy only makes sense when enable DEBUG_MUTEX. For the good readbility, it's better to invoke it in exit func when the init func invokes mutex_init. Signed-off-by: Gao Feng Acked-by: Guillaume Nault Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- drivers/net/ppp/ppp_generic.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/ppp/ppp_generic.c b/drivers/net/ppp/ppp_generic.c index 51ba895f0522..c30c1fc7889a 100644 --- a/drivers/net/ppp/ppp_generic.c +++ b/drivers/net/ppp/ppp_generic.c @@ -918,6 +918,7 @@ static __net_exit void ppp_exit_net(struct net *net) { struct ppp_net *pn =3D net_generic(net, ppp_net_id); =20 + mutex_destroy(&pn->all_ppp_mutex); idr_destroy(&pn->units_idr); } =20 --=20 2.11.0