Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp6926018rwr; Tue, 25 Apr 2023 06:02:28 -0700 (PDT) X-Google-Smtp-Source: AKy350YMvhLaKCNqscXvmSNhRZSSYg0MmcPg2JuTeUn3jpwxr8sMDDEgH2p5VU3grhx4PfBJyJcb X-Received: by 2002:a05:6a20:7f99:b0:f3:d92:a209 with SMTP id d25-20020a056a207f9900b000f30d92a209mr13664297pzj.0.1682427748673; Tue, 25 Apr 2023 06:02:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682427748; cv=none; d=google.com; s=arc-20160816; b=v0gRjzhFAuaIX30vYD/GtLsTiscx4KyEqULn5q8zKXRfZWwb1gTylN2t8mqNhHGT8P x0UdOESlmPpjkekc3Q9rt8Ub/MJTno0HWTnkO/Ypqb91zY3QB/inqDtCzBrhx9DnwklM g37yDUTOnTOc2DX3QNVjnZzwGAC+595/aJh3v6eVq2xUUOMldbzNzPCodG1YznhkhqVl LnfaM9a3ktewd+Z8pek/iEmNs240kKh+eitTsa5XUOlCC/9KqNM57kjN9kkrgpf+9osW baAVD8+JfDb9kgDGKCGNnXaR5Ql3j8+3nlUpuqd7OIHU/j1PLj2K6l+thT/4MeMrA8w4 yXiQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=D2qvPY2GZhnLXiK7nBs0QVpYZyujZA/klQR7p+aUoOY=; b=dcLWFF9syp1wCRhgJ4F9HKgOUrsNhw/cAg64xpsybL4OXXuUU7CG0strfRLXJblPxR /5XUPyP+Hzja50XaxVfWeqSa+nhw+LRiM117rp4jgiaa9UoeJqVr/DazrWPquzgvPnx3 8sT85eAw8FQMh7XV/SzrJE3n3k2dOEzbt19GYe2O0bZK2InN5dQhy0FxJtfejniTTrts u/n50fPj2tB5RSnAm8FSM0T6bDYxKJYN2qB+OsDOhCqWFSA5eBadctBAj1xinj9stLQX ic6ilnw56Wn/aJInYZh/xOKDBDzyeSEmdkHu280HjPsXFp+5JhHETocSlwzYIJMpsLqx YrwQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id m65-20020a632644000000b0050309caf60esi13674044pgm.750.2023.04.25.06.02.00; Tue, 25 Apr 2023 06:02:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233908AbjDYM5P (ORCPT + 99 others); Tue, 25 Apr 2023 08:57:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60276 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233800AbjDYM5O (ORCPT ); Tue, 25 Apr 2023 08:57:14 -0400 Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 20A0819A5 for ; Tue, 25 Apr 2023 05:57:12 -0700 (PDT) Received: from kwepemi500012.china.huawei.com (unknown [172.30.72.57]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4Q5MRn0LPvzsR6D; Tue, 25 Apr 2023 20:55:33 +0800 (CST) Received: from cgs.huawei.com (10.244.148.83) by kwepemi500012.china.huawei.com (7.221.188.12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.23; Tue, 25 Apr 2023 20:57:09 +0800 From: Gaosheng Cui To: , , CC: Subject: [PATCH -next] crypto: jitter - change module_init(jent_mod_init) to subsys_initcall(jent_mod_init) Date: Tue, 25 Apr 2023 20:57:09 +0800 Message-ID: <20230425125709.39470-1-cuigaosheng1@huawei.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.244.148.83] X-ClientProxiedBy: dggems701-chm.china.huawei.com (10.3.19.178) To kwepemi500012.china.huawei.com (7.221.188.12) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham 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-crypto@vger.kernel.org The ecdh-nist-p256 algorithm will depend on jitterentropy_rng, and when they are built into kernel, the order of registration should be done such that the underlying algorithms are ready before the ones on top are registered. Now ecdh is initialized with subsys_initcall but jitterentropy_rng is initialized with module_init. This patch will change module_init(jent_mod_init) to subsys_initcall(jent_mod_init), so jitterentropy_rng will be registered before ecdh-nist-p256 when they are built into kernel. Signed-off-by: Gaosheng Cui --- crypto/jitterentropy-kcapi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crypto/jitterentropy-kcapi.c b/crypto/jitterentropy-kcapi.c index b9edfaa51b27..563c1ea8c8fe 100644 --- a/crypto/jitterentropy-kcapi.c +++ b/crypto/jitterentropy-kcapi.c @@ -205,7 +205,7 @@ static void __exit jent_mod_exit(void) crypto_unregister_rng(&jent_alg); } -module_init(jent_mod_init); +subsys_initcall(jent_mod_init); module_exit(jent_mod_exit); MODULE_LICENSE("Dual BSD/GPL"); -- 2.25.1