Received: by 10.223.185.116 with SMTP id b49csp5863889wrg; Wed, 7 Mar 2018 20:29:39 -0800 (PST) X-Google-Smtp-Source: AG47ELt4EG1Tbg8d1SMBJ+415f8mgFv9uU4mGgjiAjrDt6IBgvBGUX6md6Vm39Z2OH1sdcAojPVy X-Received: by 10.98.237.12 with SMTP id u12mr24801720pfh.72.1520483379009; Wed, 07 Mar 2018 20:29:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520483378; cv=none; d=google.com; s=arc-20160816; b=fPBHIAEA70pqthrxlSKUjCcIuBtMpxYB3KdlORkHH8Rn3oi8JkiLNcGsbojpgUlw9T smKT75VgOpJRBckgRFiwDduZrevXANFDoIR3MTcyA/fmIhQbUQ41tmUvDaNxzT3WI6sF gnQrwi2DbCDAsL4AuiXZ5mIpMSjJwbbSdFNEDOADE0iE4e0FV20xXMZurVKojn6+Ag8V gPgpNr171NtWdvA5DiDTfRKunvpNesBaeQKo2XAp0VlCqBEEwPWd0uPjygLxtu1Q3hlq zdGr9xX+2+t31S4QqpwJw7FIXXwOQCb4vVMpOWTI5seK+MR4CAHx5ZLZj+5ak+JlJzV0 q/Cg== 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=QtntIN0cfL4Y4zrnrMuO4xCsz7hxNEkPLx+XCwc7s5fZa0qB9+R0hfRs+XAtL2mJuB YreRuijvajD845Sp7XoJUhZeRqrhOCV3B+iQmCfyt/N3kIf6M4d2MMsfyYT324nln/9J 7Rwdyv0PuPL5OV+66Bx8cw150Ofqm0CpN/f4CJ2Q8nz3bgQnOAJcOiuisf4AvuD1u3iZ vGdu8tNvEOBiGA+yhoQnc+IayCAIzaSqnsbooZ823+aPceptOfnFRrvgcPycmk2pkTCA jdNaX17zj7YDLLJBUHZw7jDVwKga+JQAQeMoYo26AXuTnwzTt04+lC0k6W3NS8Y0wWi3 5ZxQ== 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 x3-v6si14008102plo.608.2018.03.07.20.29.24; Wed, 07 Mar 2018 20:29:38 -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 S934903AbeCHE2F (ORCPT + 99 others); Wed, 7 Mar 2018 23:28:05 -0500 Received: from out30-131.freemail.mail.aliyun.com ([115.124.30.131]:40967 "EHLO out30-131.freemail.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934887AbeCHE2D (ORCPT ); Wed, 7 Mar 2018 23:28:03 -0500 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R141e4;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_---0Sz3h0Gy_1520483226; Received: from localhost(mailfrom:zhang.jia@linux.alibaba.com fp:106.11.233.53) by smtp.aliyun-inc.com(127.0.0.1); Thu, 08 Mar 2018 12:27:06 +0800 From: Jia Zhang To: jeyu@kernel.org Cc: linux-kernel@vger.kernel.org, zhang.jia@linux.alibaba.com Subject: [PATCH 2/4] module: Create the entry point initialize_module() Date: Thu, 8 Mar 2018 12:27:01 +0800 Message-Id: <1520483223-6596-3-git-send-email-zhang.jia@linux.alibaba.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1520483223-6596-1-git-send-email-zhang.jia@linux.alibaba.com> References: <1520483223-6596-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