Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp1628888pxp; Thu, 17 Mar 2022 13:05:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxwD3iyaLC7J3KuyUsZf/DoVsJOylWNuEGcoV8XT6q0r1ZYHRgfDufXsJwx4bRJH47EMH4b X-Received: by 2002:a63:28d:0:b0:365:8e16:5c19 with SMTP id 135-20020a63028d000000b003658e165c19mr5038366pgc.579.1647547545451; Thu, 17 Mar 2022 13:05:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1647547545; cv=none; d=google.com; s=arc-20160816; b=t18jhpb3rRRlfepGM2i69fZrM6o/wE1+vLu3DLiA8WUkUZ6bJArKxlo9EBPnS7eLtX 3hAJonmTVj8482VLp+dOhtJJ0DqjLkUNR3VtdxgEAcTrCKjN9Gf3PT3/NBzeea7bGCPK pQ9HUL0YN4rrmUZhPDrxtBTX6RTr9CwGsnrrmnrnXOzD3FVy2ruRMKKU3vq/ttxg7lpK dRajRFqsbOJPi8sLqA57T2LQxwxVEhJGiyMbWNGsDZZz/xJhc/bW07mG8Bbb6Pt7IysS ONyid9wLKJroLEUnqvZ4t/678hqAqZfHIMOs900Eavajy3rcA+5OWc8FrpJkAJ8PJuDe R+mQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=j3nUpFCKIBgKRFySIWhhT+yXhRiUM60mioBt9b5hZTQ=; b=Zy/ihPIJ6NtgaYmZNwgfQ5mkC3PcALCW9aYJEew48CLD1t668cHWL51pih3+oS170c MKddRToB7TezTyVKtUo3TPAeMuS+PEAFCvlsov6PzLGtrjtDBRTYBhIv6MUy9Bp9TAtr L+oCfXTEJu2gmoU9QC7Pt8ozPGPKthAlQxuKQLMsqu3SD5yQUHo8uCHslgnOHkNJs/oX FnOC6CoIGnB/jD2SVUakyfvV5Nc6f/CGPfeLh0f/qUvdHjmyfA0nQ5zWKUTCDIb9mV5x yR32EEcSGYKw/Uh8C6JoFfNzgi8zeX+TBvI5cwYtFF+5JsGYvSgdqmR4bXo/Va4uyiHH A6lA== ARC-Authentication-Results: i=1; mx.google.com; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id 1-20020a170902c14100b00153bfa012bdsi30167plj.378.2022.03.17.13.05.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 17 Mar 2022 13:05:45 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 35776118615; Thu, 17 Mar 2022 12:54:23 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236207AbiCQPvV (ORCPT + 99 others); Thu, 17 Mar 2022 11:51:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54584 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236191AbiCQPvU (ORCPT ); Thu, 17 Mar 2022 11:51:20 -0400 Received: from mail.netfilter.org (mail.netfilter.org [217.70.188.207]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id E146F16F6C0; Thu, 17 Mar 2022 08:50:01 -0700 (PDT) Received: from netfilter.org (unknown [78.30.32.163]) by mail.netfilter.org (Postfix) with ESMTPSA id 80A5B601C6; Thu, 17 Mar 2022 16:47:31 +0100 (CET) Date: Thu, 17 Mar 2022 16:49:55 +0100 From: Pablo Neira Ayuso To: Randy Dunlap Cc: linux-kernel@vger.kernel.org, "Michael S. Tsirkin" , Jason Wang , Paolo Bonzini , Stefan Hajnoczi , Jens Axboe , Amit Shah , Arnd Bergmann , Greg Kroah-Hartman , Eli Cohen , Saeed Mahameed , Leon Romanovsky , Jozsef Kadlecsik , Florian Westphal , "David S. Miller" , Jakub Kicinski , "James E.J. Bottomley" , "Martin K. Petersen" , Felipe Balbi , =?utf-8?B?TWljaGHFgiBNaXJvc8WCYXc=?= , Sebastian Andrzej Siewior , Krzysztof Opasiak , Igor Kotrasinski , Valentina Manea , Shuah Khan , Shuah Khan , Jussi Kivilinna , Joachim Fritschi , Herbert Xu , Thomas Gleixner , Steven Rostedt , Ingo Molnar , Karol Herbst , Pekka Paalanen , Dave Hansen , Andy Lutomirski , Peter Zijlstra , Borislav Petkov , "H. Peter Anvin" , netfilter-devel@vger.kernel.org, coreteam@netfilter.org, netdev@vger.kernel.org, linux-block@vger.kernel.org, linux-crypto@vger.kernel.org, linux-rdma@vger.kernel.org, linux-scsi@vger.kernel.org, linux-usb@vger.kernel.org, nouveau@lists.freedesktop.org, virtualization@lists.linux-foundation.org, x86@kernel.org Subject: Re: [PATCH 4/9] netfilter: h323: eliminate anonymous module_init & module_exit Message-ID: References: <20220316192010.19001-1-rdunlap@infradead.org> <20220316192010.19001-5-rdunlap@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20220316192010.19001-5-rdunlap@infradead.org> X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Mar 16, 2022 at 12:20:05PM -0700, Randy Dunlap wrote: > Eliminate anonymous module_init() and module_exit(), which can lead to > confusion or ambiguity when reading System.map, crashes/oops/bugs, > or an initcall_debug log. > > Give each of these init and exit functions unique driver-specific > names to eliminate the anonymous names. > > Example 1: (System.map) > ffffffff832fc78c t init > ffffffff832fc79e t init > ffffffff832fc8f8 t init > > Example 2: (initcall_debug log) > calling init+0x0/0x12 @ 1 > initcall init+0x0/0x12 returned 0 after 15 usecs > calling init+0x0/0x60 @ 1 > initcall init+0x0/0x60 returned 0 after 2 usecs > calling init+0x0/0x9a @ 1 > initcall init+0x0/0x9a returned 0 after 74 usecs LGTM. Should I route this through the netfilter tree? > Fixes: f587de0e2feb ("[NETFILTER]: nf_conntrack/nf_nat: add H.323 helper port") > Signed-off-by: Randy Dunlap > Cc: Pablo Neira Ayuso > Cc: Jozsef Kadlecsik > Cc: Florian Westphal > Cc: netfilter-devel@vger.kernel.org > Cc: coreteam@netfilter.org > Cc: "David S. Miller" > Cc: Jakub Kicinski > Cc: netdev@vger.kernel.org > --- > net/ipv4/netfilter/nf_nat_h323.c | 8 ++++---- > 1 file changed, 4 insertions(+), 4 deletions(-) > > --- lnx-517-rc8.orig/net/ipv4/netfilter/nf_nat_h323.c > +++ lnx-517-rc8/net/ipv4/netfilter/nf_nat_h323.c > @@ -580,7 +580,7 @@ static struct nf_ct_helper_expectfn call > }; > > /****************************************************************************/ > -static int __init init(void) > +static int __init nf_nat_h323_init(void) > { > BUG_ON(set_h245_addr_hook != NULL); > BUG_ON(set_h225_addr_hook != NULL); > @@ -607,7 +607,7 @@ static int __init init(void) > } > > /****************************************************************************/ > -static void __exit fini(void) > +static void __exit nf_nat_h323_fini(void) > { > RCU_INIT_POINTER(set_h245_addr_hook, NULL); > RCU_INIT_POINTER(set_h225_addr_hook, NULL); > @@ -624,8 +624,8 @@ static void __exit fini(void) > } > > /****************************************************************************/ > -module_init(init); > -module_exit(fini); > +module_init(nf_nat_h323_init); > +module_exit(nf_nat_h323_fini); > > MODULE_AUTHOR("Jing Min Zhao "); > MODULE_DESCRIPTION("H.323 NAT helper");