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]
Date: Mon, 6 May 2024 16:49:33 +0200
From: Michal Hocko <mhocko@...e.com>
To: Matthew Wilcox <willy@...radead.org>
Cc: Xiu Jianfeng <xiujianfeng@...wei.com>, hannes@...xchg.org,
	roman.gushchin@...ux.dev, shakeel.butt@...ux.dev,
	muchun.song@...ux.dev, akpm@...ux-foundation.org,
	cgroups@...r.kernel.org, linux-mm@...ck.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH -next] mm: memcg: use meaningful error code for return
 value

On Mon 06-05-24 14:53:47, Matthew Wilcox wrote:
> On Mon, May 06, 2024 at 01:36:43PM +0000, Xiu Jianfeng wrote:
> > alloc_mem_cgroup_per_node_info() returns 1 if failed, use -ENOMEM
> > instead, which is more meaningful.
> 
> This should probably be changed to return true/false instead of
> an int.

Agreed. Or change the only caller to consume the error. Changing to bool
seems like the easiest way.

-- 
Michal Hocko
SUSE Labs

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ