lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 6 Sep 2022 17:36:20 +0800
From:   Xiu Jianfeng <xiujianfeng@...wei.com>
To:     <akpm@...ux-foundation.org>
CC:     <linux-mm@...ck.org>, <linux-kernel@...r.kernel.org>
Subject: [PATCH -next] secretmem: use ATOMIC_INIT() to initialize secretmem_users

The variable secretmem_users is of atomic_t type, so initialize it
properly with ATOMIC_INIT().

Signed-off-by: Xiu Jianfeng <xiujianfeng@...wei.com>
---
 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");
 
-static atomic_t secretmem_users;
+static atomic_t secretmem_users = ATOMIC_INIT(0);
 
 bool secretmem_active(void)
 {
-- 
2.17.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ