From nobody Mon Apr 6 15:40:53 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 49994C38145 for ; Tue, 6 Sep 2022 09:39:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239232AbiIFJjy (ORCPT ); Tue, 6 Sep 2022 05:39:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52568 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239072AbiIFJju (ORCPT ); Tue, 6 Sep 2022 05:39:50 -0400 Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0E3EF13CD1 for ; Tue, 6 Sep 2022 02:39:46 -0700 (PDT) Received: from dggpeml500023.china.huawei.com (unknown [172.30.72.55]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4MMKy522wszkWvk; Tue, 6 Sep 2022 17:35:57 +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.24; Tue, 6 Sep 2022 17:39:44 +0800 From: Xiu Jianfeng To: CC: , Subject: [PATCH -next] secretmem: use ATOMIC_INIT() to initialize secretmem_users Date: Tue, 6 Sep 2022 17:36:20 +0800 Message-ID: <20220906093620.243465-1-xiujianfeng@huawei.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 X-Originating-IP: [10.67.174.58] X-ClientProxiedBy: dggems703-chm.china.huawei.com (10.3.19.180) To dggpeml500023.china.huawei.com (7.185.36.114) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" The variable secretmem_users is of atomic_t type, so initialize it properly with ATOMIC_INIT(). Signed-off-by: Xiu Jianfeng --- mm/secretmem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/secretmem.c b/mm/secretmem.c index e3e9590c6fb3..796d3a92992a 100644 --- a/mm/secretmem.c +++ b/mm/secretmem.c @@ -40,7 +40,7 @@ module_param_named(enable, secretmem_enable, bool, 0400); MODULE_PARM_DESC(secretmem_enable, "Enable secretmem and memfd_secret(2) system call"); =20 -static atomic_t secretmem_users; +static atomic_t secretmem_users =3D ATOMIC_INIT(0); =20 bool secretmem_active(void) { --=20 2.17.1