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:   Tue, 13 Jul 2021 14:21:58 +0000
From:   Chuck Lever III <chuck.lever@...cle.com>
To:     Mel Gorman <mgorman@...hsingularity.net>
CC:     Andrew Morton <akpm@...ux-foundation.org>,
        Desmond Cheong Zhi Xi <desmondcheongzx@...il.com>,
        Zhang Qiang <Qiang.Zhang@...driver.com>,
        Yanfei Xu <yanfei.xu@...driver.com>,
        Jesper Dangaard Brouer <brouer@...hat.com>,
        Matteo Croce <mcroce@...rosoft.com>,
        Linux-MM <linux-mm@...ck.org>,
        LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 2/4] mm/page_alloc: correct return value when failing at
 preparing



> On Jul 13, 2021, at 9:56 AM, Mel Gorman <mgorman@...hsingularity.net> wrote:
> 
> From: Yanfei Xu <yanfei.xu@...driver.com>
> 
> If the array passed in is already partially populated, we should
> return "nr_populated" even failing at preparing arguments stage.
> 
> Signed-off-by: Yanfei Xu <yanfei.xu@...driver.com>
> Signed-off-by: Mel Gorman <mgorman@...hsingularity.net>
> Link: https://lore.kernel.org/r/20210709102855.55058-1-yanfei.xu@windriver.com
> ---
> mm/page_alloc.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/mm/page_alloc.c b/mm/page_alloc.c
> index 6ef86f338151..803414ce9264 100644
> --- a/mm/page_alloc.c
> +++ b/mm/page_alloc.c
> @@ -5255,7 +5255,7 @@ unsigned long __alloc_pages_bulk(gfp_t gfp, int preferred_nid,
> 	gfp &= gfp_allowed_mask;
> 	alloc_gfp = gfp;
> 	if (!prepare_alloc_pages(gfp, 0, preferred_nid, nodemask, &ac, &alloc_gfp, &alloc_flags))
> -		return 0;
> +		return nr_populated;

Can you restore the hunk in patch 3/4 that changes this "return nr_populated;"
to "goto out;" ?


> 	gfp = alloc_gfp;
> 
> 	/* Find an allowed local zone that meets the low watermark. */
> -- 
> 2.26.2
> 

--
Chuck Lever



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ