From patchwork Tue Jul 28 13:47:39 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Eric Dumazet X-Patchwork-Id: 30301 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@bilbo.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from ozlabs.org (ozlabs.org [203.10.76.45]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "mx.ozlabs.org", Issuer "CA Cert Signing Authority" (verified OK)) by bilbo.ozlabs.org (Postfix) with ESMTPS id DB832B7093 for ; Tue, 28 Jul 2009 23:48:04 +1000 (EST) Received: by ozlabs.org (Postfix) id CDCC7DDD0B; Tue, 28 Jul 2009 23:48:04 +1000 (EST) Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by ozlabs.org (Postfix) with ESMTP id 5588DDDD04 for ; Tue, 28 Jul 2009 23:48:04 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754176AbZG1Nrx (ORCPT ); Tue, 28 Jul 2009 09:47:53 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754173AbZG1Nrw (ORCPT ); Tue, 28 Jul 2009 09:47:52 -0400 Received: from gw1.cosmosbay.com ([212.99.114.194]:54360 "EHLO gw1.cosmosbay.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752703AbZG1Nrw (ORCPT ); Tue, 28 Jul 2009 09:47:52 -0400 Received: from [127.0.0.1] (localhost [127.0.0.1]) by gw1.cosmosbay.com (8.13.7/8.13.7) with ESMTP id n6SDldvR011793; Tue, 28 Jul 2009 15:47:40 +0200 Message-ID: <4A6F017B.4060909@gmail.com> Date: Tue, 28 Jul 2009 15:47:39 +0200 From: Eric Dumazet User-Agent: Thunderbird 2.0.0.22 (Windows/20090605) MIME-Version: 1.0 To: "David S. Miller" CC: Pavel Emelyanov , Igor M Podlesny , Andrew Morton , netdev@vger.kernel.org, Cyrill Gorcunov Subject: [PATCH] pppol2tp: calls unregister_pernet_gen_device() at unload time References: <20090722134557.2457c5f5.akpm@linux-foundation.org> <43d009740907222339n50ebe411ya6453dc5a294b9a0@mail.gmail.com> <20090723000100.d74d6b1c.akpm@linux-foundation.org> <43d009740907272340g7f98ed55lfff38bfedd867a99@mail.gmail.com> <4A6EBA88.8030205@cosmosbay.com> <4A6ECA3A.4050309@openvz.org> <4A6EEF69.1050001@cosmosbay.com> <4A6EF0BF.2050801@gmail.com> <4A6EF705.6070403@openvz.org> <4A6EFA35.3060309@gmail.com> <4A6EFB81.4090105@gmail.com> In-Reply-To: <4A6EFB81.4090105@gmail.com> X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-1.6 (gw1.cosmosbay.com [0.0.0.0]); Tue, 28 Jul 2009 15:47:40 +0200 (CEST) Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Eric Dumazet a écrit : > Seems drivers/net/pppol2tp.c is a suspect... > > It uses register_pernet_gen_device() from pppol2tp_init() > but doesnt call unregister_pernet_gen_device() OK patch seems really easy... This bug was added in commit 4e9fb8016a351b5b9da7fea32bcfdbc9d836e421 net: pppol2tp - introduce net-namespace functionality So this is a stable candidate I guess ? Thank you [PATCH] pppol2tp: calls unregister_pernet_gen_device() at unload time Failure to call unregister_pernet_gen_device() can exhaust memory if module is loaded/unloaded many times. Signed-off-by: Eric Dumazet Acked-by: Cyrill Gorcunov --- -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/net/pppol2tp.c b/drivers/net/pppol2tp.c index e7935d0..e0f9219 100644 --- a/drivers/net/pppol2tp.c +++ b/drivers/net/pppol2tp.c @@ -2680,6 +2680,7 @@ out_unregister_pppol2tp_proto: static void __exit pppol2tp_exit(void) { unregister_pppox_proto(PX_PROTO_OL2TP); + unregister_pernet_gen_device(pppol2tp_net_id, &pppol2tp_net_ops); proto_unregister(&pppol2tp_sk_proto); }