Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp3257675rwi; Fri, 28 Oct 2022 18:47:23 -0700 (PDT) X-Google-Smtp-Source: AMsMyM691dWiFtE+5C6/QeaWmlo67ED6Ws1Rzxh3Q8P8y6DRaFYjD43kt15vJpzTDwT9AvAK9VQ3 X-Received: by 2002:a17:907:628a:b0:781:bbff:1d42 with SMTP id nd10-20020a170907628a00b00781bbff1d42mr1859972ejc.375.1667008043011; Fri, 28 Oct 2022 18:47:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667008043; cv=none; d=google.com; s=arc-20160816; b=olqRbel/2SemGd/VBEXR9Dg+daOtji3elQEysnJlB/DkT1F2zmpVIQ8FgM4ZXgSPhr lhSqFGljCUEymQj2JCY5urk1lWSI8ZYRldbdscJK+UHyN4DvCcLB7IA/2mTTBlQID9sa fLOQYjSKuPmI/tQQEnHmI44Qp005ZJYvRkcuLp3lL2Kda2R7QYYBjlUeRbuA8YCjKX5D 8q1kfEbRwyDvJEBgVoceWJ9uPtzhT1lSxji84xBme+BNa5VJ/vdVLEYqR3Dz/NotWdXM 4DtMvYdsLh9BoPtVLHe+atBQGY4e1FKlGRll1NZR01a+VopXbfKBI8x/xtxhR/7ssq4V ib+Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:subject:cc:to:from; bh=9vLvGno+O1MVbEAOR4s5qMZglogqyZsRNlNe0IsNrDM=; b=nVekuVYND+uPXbgS4tz6XNhH0LbTI3obiPmAXXY5NHtl0xIpjwQls4Yr9EgQM8xJ2+ TrAeejoXHZXdh8fXaFxWHpM0mNrWgx/KqDluVNK+qMgd8KUqzxyBZ30ZXF5Z3TD5ebPO 6xhPyd3sk4YHLtHETs6Ps7ktll0Y+4empGKumUqv9IVNIXR6u08G6839VT35cMhpO3Py tq4p7N6j121hLCKPinDEAXYBviw+SEvt3J4Y2HRCrpiakGij8/6lYHiw91w/mW4LduR4 Ty2wyTftvJdHynxB2v4jpUTst80x///ZCLPtW2y7hEAChKDmOni3D78z7BC/KMddfTHG ZMRA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-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 qw9-20020a1709066a0900b007adb388df30si121772ejc.804.2022.10.28.18.46.58; Fri, 28 Oct 2022 18:47:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-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-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-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 S229727AbiJ2B22 (ORCPT + 99 others); Fri, 28 Oct 2022 21:28:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38840 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229450AbiJ2B20 (ORCPT ); Fri, 28 Oct 2022 21:28:26 -0400 Received: from szxga03-in.huawei.com (szxga03-in.huawei.com [45.249.212.189]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 325B013F87; Fri, 28 Oct 2022 18:28:26 -0700 (PDT) Received: from dggpeml500023.china.huawei.com (unknown [172.30.72.54]) by szxga03-in.huawei.com (SkyGuard) with ESMTP id 4MzhYp6j8DzFqRp; Sat, 29 Oct 2022 09:25:34 +0800 (CST) Received: from ubuntu1804.huawei.com (10.67.174.58) by dggpeml500023.china.huawei.com (7.185.36.114) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Sat, 29 Oct 2022 09:28:24 +0800 From: Xiu Jianfeng To: , , , CC: , , Subject: [PATCH] apparmor: Add __init annotation to aa_{setup/teardown}_dfa_engine() Date: Sat, 29 Oct 2022 09:25:05 +0800 Message-ID: <20221029012505.227136-1-xiujianfeng@huawei.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.67.174.58] X-ClientProxiedBy: dggems706-chm.china.huawei.com (10.3.19.183) To dggpeml500023.china.huawei.com (7.185.36.114) 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 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-kernel@vger.kernel.org The aa_setup_dfa_engine() and aa_teardown_dfa_engine() is only called in apparmor_init(), so let us add __init annotation to them. Fixes: 11c236b89d7c ("apparmor: add a default null dfa") Signed-off-by: Xiu Jianfeng --- security/apparmor/match.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/security/apparmor/match.c b/security/apparmor/match.c index 5095c26ca683..b97ef5e1db73 100644 --- a/security/apparmor/match.c +++ b/security/apparmor/match.c @@ -31,7 +31,7 @@ static char stacksplitdfa_src[] = { }; struct aa_dfa *stacksplitdfa; -int aa_setup_dfa_engine(void) +int __init aa_setup_dfa_engine(void) { int error; @@ -59,7 +59,7 @@ int aa_setup_dfa_engine(void) return 0; } -void aa_teardown_dfa_engine(void) +void __init aa_teardown_dfa_engine(void) { aa_put_dfa(stacksplitdfa); aa_put_dfa(nulldfa); -- 2.17.1