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>] [day] [month] [year] [list]
Date:	Mon, 29 Jun 2015 17:52:14 +0200
From:	Michal Hocko <mhocko@...e.cz>
To:	Nicholas Krause <xerofoify@...il.com>
Cc:	hannes@...xchg.org, cgroups@...r.kernel.org, linux-mm@...ck.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] mm:Return proper error code return if call to
 kzalloc_node falis in the function alloc_mem_cgroup_per_zone_info

On Mon 29-06-15 11:46:53, Nicholas Krause wrote:
> This changes us returning the value of one to -ENOMEM when the call
> for allocating memory with the function kzalloc_node fails in order
> to better comply with kernel coding pratices of returning this
> particular error code when memory allocations that are unrecoverable
> occur.

I do not see any point in such a patch. Let me repeat, and hopefully for
the last time, the patch has to make _sense_ and the changelog should
provide a _justification_ for the change. None of this is true for this
patch.

> Signed-off-by: Nicholas Krause <xerofoify@...il.com>

I am not interested in changes like this in the code I maintain.

> ---
>  mm/memcontrol.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/mm/memcontrol.c b/mm/memcontrol.c
> index acb93c5..4e80811 100644
> --- a/mm/memcontrol.c
> +++ b/mm/memcontrol.c
> @@ -4442,7 +4442,7 @@ static int alloc_mem_cgroup_per_zone_info(struct mem_cgroup *memcg, int node)
>  		tmp = -1;
>  	pn = kzalloc_node(sizeof(*pn), GFP_KERNEL, tmp);
>  	if (!pn)
> -		return 1;
> +		return -ENOMEM;
>  
>  	for (zone = 0; zone < MAX_NR_ZONES; zone++) {
>  		mz = &pn->zoneinfo[zone];
> -- 
> 2.1.4
> 

-- 
Michal Hocko
SUSE Labs
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ