Received: by 10.213.65.68 with SMTP id h4csp887892imn; Fri, 23 Mar 2018 20:03:38 -0700 (PDT) X-Google-Smtp-Source: AG47ELvzO/QsKau3NySpqxc08spwjn1T3JsxBgZ5jrBHQh7AgG9kwKu4AGgvQpfoE0Hk8vPVGUCT X-Received: by 10.98.205.69 with SMTP id o66mr17679899pfg.34.1521860618318; Fri, 23 Mar 2018 20:03:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521860618; cv=none; d=google.com; s=arc-20160816; b=nqZpLSYjU/47QiP+KJt9Pz8oNjz4nYY9ifg8907XYrKET+OqdUN83EPhOJRKsXBg+v j8/dziQBKOw1YKAdWT+IN0r1WiwLz0JcA1IkUI/4asvWq/lYSXOTLkwUYKeBzT29CtlM ihCSF/nWsqXzTsLp9piktarV98T2LHSSWxC8JIoa0i5JzHctENL58x5Vk9e8Lh1RyeLX IxDpXsZwYCz4gS1py6o0jre+HboaFp6tGXm7Pjwq1tJ3xLVJpZOQQ0cVhd+Uw2GmIp2u aQ9rJK07DuJ0koVDYqHBWQN+FFHLYgUo7YRo+2SWjPKgKqhXmqXLl0nJaU2Q+ErMXX2M YfrQ== 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=H0WpunpjnVyRmU9ZWRLiVDYWL6+DUSJdz90Oz7gx8HpbbSVlooPBEvtwSUy3RnK/J0 /jhtvPc63MvndSbpLvwr5VvlEjlsfS2Ug2USrDJqjW5QlqoYDtH2v/2MgCwZpu4H7igB mHU423QKXvVVn+k7ZyYehU3BKP68N6eFS5YDdO9HlYlaNHlZEy1k7dkqRrjftsb1ff8M RmX6d9Z8v5trqXVofisFS6E8WBqUWNGW87+NGjNEbmFIi4t2X7pl41dwjMBY5fRbFImo re7q7udikayFjsmY6dTupRkBlt/CNx2gW83rBJRsCs1wTwjE6bReOiuEWdpKAP0OLLe3 jTmg== 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 37-v6si1108048pld.737.2018.03.23.20.02.44; Fri, 23 Mar 2018 20:03:38 -0700 (PDT) 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 S1751889AbeCXC7x (ORCPT + 99 others); Fri, 23 Mar 2018 22:59:53 -0400 Received: from out30-132.freemail.mail.aliyun.com ([115.124.30.132]:40739 "EHLO out30-132.freemail.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751531AbeCXC7v (ORCPT ); Fri, 23 Mar 2018 22:59:51 -0400 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R281e4;CH=green;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e01355;MF=zhang.jia@linux.alibaba.com;NM=1;PH=DS;RN=3;SR=0;TI=SMTPD_---0T--Ioa8_1521860388; Received: from localhost(mailfrom:zhang.jia@linux.alibaba.com fp:106.11.233.142) by smtp.aliyun-inc.com(127.0.0.1); Sat, 24 Mar 2018 10:59:48 +0800 From: Jia Zhang To: jeyu@kernel.org Cc: linux-kernel@vger.kernel.org, zhang.jia@linux.alibaba.com Subject: [PATCH 2/3] module: Create the entry point initialize_module() Date: Sat, 24 Mar 2018 10:59:48 +0800 Message-Id: <1521860389-19262-3-git-send-email-zhang.jia@linux.alibaba.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1521860389-19262-1-git-send-email-zhang.jia@linux.alibaba.com> References: <1521860389-19262-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