summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGao Feng <gfree.wind@vip.163.com>2017-10-31 18:25:37 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-12-20 10:04:59 +0100
commit561b9d998e654801d439529adb7aa09e3a0d33d4 (patch)
treeab5ae92835528671e8c22c1d4c5fc76099ba55dd
parent083dd685aebd7ed22320a3e02c405a67c5c0cbd0 (diff)
downloadlinux-stable-561b9d998e654801d439529adb7aa09e3a0d33d4.tar.gz
linux-stable-561b9d998e654801d439529adb7aa09e3a0d33d4.tar.bz2
linux-stable-561b9d998e654801d439529adb7aa09e3a0d33d4.zip
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: Gao Feng <gfree.wind@vip.163.com> Acked-by: Guillaume Nault <g.nault@alphalink.fr> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Sasha Levin <alexander.levin@verizon.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/net/ppp/ppp_generic.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/ppp/ppp_generic.c b/drivers/net/ppp/ppp_generic.c
index dc454138d600..e2decf71c6d1 100644
--- a/drivers/net/ppp/ppp_generic.c
+++ b/drivers/net/ppp/ppp_generic.c
@@ -942,6 +942,7 @@ static __net_exit void ppp_exit_net(struct net *net)
unregister_netdevice_many(&list);
rtnl_unlock();
+ mutex_destroy(&pn->all_ppp_mutex);
idr_destroy(&pn->units_idr);
}