Received: by 10.223.185.116 with SMTP id b49csp7192791wrg; Thu, 1 Mar 2018 01:10:21 -0800 (PST) X-Google-Smtp-Source: AG47ELtS+3VO2mrYdYwpC52QyXBfEnNUqC4vMjNtjrkVa5UNuYRRzKCwlzpCAJ8u/gLJfSMi3tzO X-Received: by 2002:a17:902:12d:: with SMTP id 42-v6mr1287658plb.141.1519895421024; Thu, 01 Mar 2018 01:10:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519895421; cv=none; d=google.com; s=arc-20160816; b=PR0qo/1ErwmPznLWJscThqdUaqoFtspDsdIiMO5Yw34Z7MIDPCOHSbje4TQpSoYtHi 2FSBDba60mQB7B4Wz19nz8BMrMUnsQIe+HRR0GZIEPgARqZHz1ntXOzAOJktiCVYQ8n+ 7VG1pIV46Tmvvev0n75aPx44zlCqfW5NiGT4ZXgJL1Ofdgh+GkcKZzbAzsiBUbENz6jn K6RzssgGVD5Ie0+vxDurPGeOw0Q2rFIp6gPXw+EFYI8oyTYZxyI+K2yKUn6y2AtBhi5E emot5RX8Tbn+SgPrTJFXEYzNBNbv5HryXCtZURiXVT7QtAuFWD5rmW2cJ8JD7dngOL+y 4hlg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=zQ5LPBxrCXzkUY0qyo9tIJNXcyLBumDF9TEsdKhq0nc=; b=MaNxihk9f8zdGfdMq5hw22GGZTKAHc77u9Iu/goBjoUQVojPkyBGWRj0yeH3omqN8I giPJ5yDkWqAOkw1JPdaEr59h0CG47SDPIlJ4FZBvvmn4Xvnhx9ShVx/L1QlJN1gBLXaD PaY0aPdux3bYpDyjWsxiYXdpgfCesBxrixmdYcGgm7Ydyn/5znjin5IO3rVOma9WMea6 zroNUtB19SqeBFBEUmiNDdzZUCtm3O+61O1WmXZQwReaohh+y/GLUXq+2luSrdqMItsx 4M9bbOFAFr5GxUS4ZCiqHx6JGPDucwLyXsa5aWt5lgsufOtb3Ggr9ndwKGPjbCL4Np1Y MOKQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v10-v6si2883388plo.61.2018.03.01.01.10.06; Thu, 01 Mar 2018 01:10:20 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S966700AbeCAJJ1 (ORCPT + 99 others); Thu, 1 Mar 2018 04:09:27 -0500 Received: from out30-131.freemail.mail.aliyun.com ([115.124.30.131]:45500 "EHLO out30-131.freemail.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965026AbeCAJJV (ORCPT ); Thu, 1 Mar 2018 04:09:21 -0500 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R161e4;CH=green;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e07417;MF=zhang.jia@linux.alibaba.com;NM=1;PH=DS;RN=3;SR=0;TI=SMTPD_---0Sykfl9V_1519895347; Received: from localhost(mailfrom:zhang.jia@linux.alibaba.com fp:106.11.232.75) by smtp.aliyun-inc.com(127.0.0.1); Thu, 01 Mar 2018 17:09:07 +0800 From: Jia Zhang To: jeyu@kernel.org Cc: zhang.jia@linux.alibaba.com, linux-kernel@vger.kernel.org Subject: [PATCH 2/4] module: Create the entry point initialize_module() Date: Thu, 1 Mar 2018 17:09:04 +0800 Message-Id: <1519895346-7961-2-git-send-email-zhang.jia@linux.alibaba.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1519895346-7961-1-git-send-email-zhang.jia@linux.alibaba.com> References: <1519895346-7961-1-git-send-email-zhang.jia@linux.alibaba.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This entry point currently includes the procfs initialization, and will include a securityfs initialization. Signed-off-by: Jia Zhang --- kernel/module.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/kernel/module.c b/kernel/module.c index 003d0ab..79825ea 100644 --- a/kernel/module.c +++ b/kernel/module.c @@ -4243,7 +4243,11 @@ static int __init proc_modules_init(void) proc_create("modules", 0, NULL, &proc_modules_operations); return 0; } -module_init(proc_modules_init); +#else /* CONFIG_PROC_FS */ +static int __init proc_modules_init(void) +{ + return 0; +} #endif /* Given an address, look for it in the module exception tables. */ @@ -4388,3 +4392,11 @@ void module_layout(struct module *mod, } EXPORT_SYMBOL(module_layout); #endif + +static int __init initialize_module(void) +{ + proc_modules_init(); + + return 0; +} +module_init(initialize_module); -- 1.8.3.1