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-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Z78wI0z_0LHVm_WK@google.com>
Date: Wed, 26 Feb 2025 15:15:47 +0000
From: Yosry Ahmed <yosry.ahmed@...ux.dev>
To: Sun YangKai <sunk67188@...il.com>
Cc: nphamcs@...il.com, Johannes Weiner <hannes@...xchg.org>,
	Chengming Zhou <chengming.zhou@...ux.dev>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Kanchana P Sridhar <kanchana.p.sridhar@...el.com>,
	"open list:ZSWAP COMPRESSED SWAP CACHING" <linux-mm@...ck.org>,
	open list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] mm: zswap: use ATOMIC_LONG_INIT to initialize
 zswap_stored_pages

On Wed, Feb 26, 2025 at 08:41:39PM +0800, Sun YangKai wrote:
> This is currently the only atomic_long_t variable initialized by
> ATOMIC_INIT macro found in the kernel by using
> `grep -r atomic_long_t | grep ATOMIC_INIT`
> 
> This was introduced in 6e1fa55, in which we modified

We use the first 12 characters in the SHA1 to minimize collisions (same
in 'Fixes' below), so both should be 6e1fa555ec77.

> the type of zswap_stored_pages to atomic_long_t,
> but didn't change the initialization.
> 
> Fixes: 6e1fa55 ("mm: zswap: modify zswap_stored_pages to be atomic_long_t")
> Signed-off-by: Sun YangKai <sunk67188@...il.com>

Acked-by: Yosry Ahmed <yosry.ahmed@...ux.dev>

> ---
>  mm/zswap.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/mm/zswap.c b/mm/zswap.c
> index ac9d299e7d0c..23365e76a3ce 100644
> --- a/mm/zswap.c
> +++ b/mm/zswap.c
> @@ -43,7 +43,7 @@
>  * statistics
>  **********************************/
>  /* The number of compressed pages currently stored in zswap */
> -atomic_long_t zswap_stored_pages = ATOMIC_INIT(0);
> +atomic_long_t zswap_stored_pages = ATOMIC_LONG_INIT(0);
>  
>  /*
>   * The statistics below are not protected from concurrent access for
> -- 
> 2.48.1
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ