Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4c1eff22 authored by Gao Feng's avatar Gao Feng Committed by Greg Kroah-Hartman
Browse files

ppp: Destroy the mutex when cleanup




[ 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: default avatarGao Feng <gfree.wind@vip.163.com>
Acked-by: default avatarGuillaume Nault <g.nault@alphalink.fr>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarSasha Levin <alexander.levin@verizon.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 069848c7
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -916,6 +916,7 @@ static __net_exit void ppp_exit_net(struct net *net)
{
	struct ppp_net *pn = net_generic(net, ppp_net_id);

	mutex_destroy(&pn->all_ppp_mutex);
	idr_destroy(&pn->units_idr);
}