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: <20200830194417.GA4039@lca.pw>
Date:   Sun, 30 Aug 2020 15:44:18 -0400
From:   Qian Cai <cai@....pw>
To:     Muchun Song <songmuchun@...edance.com>
Cc:     naoya.horiguchi@....com, akpm@...ux-foundation.org,
        linux-mm@...ck.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] mm/memory-failure: Fix return wrong value when isolate
 page fail

On Sun, Aug 30, 2020 at 04:10:53PM +0800, Muchun Song wrote:
> When we isolate page fail, we should not return 0, because we do not
> set page HWPoison on any page.
> 
> Signed-off-by: Muchun Song <songmuchun@...edance.com>

This seems solve the problem for me that madvise(MADV_SOFT_OFFLINE) will run
into ENOMEM eventually:

https://lore.kernel.org/lkml/20200811220643.GB39857@lca.pw/

Reviewed-by: Qian Cai <cai@....pw>

> ---
>  mm/memory-failure.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/mm/memory-failure.c b/mm/memory-failure.c
> index 696505f56910..4eb3c42ffe35 100644
> --- a/mm/memory-failure.c
> +++ b/mm/memory-failure.c
> @@ -1850,6 +1850,7 @@ static int __soft_offline_page(struct page *page)
>  	} else {
>  		pr_info("soft offline: %#lx: %s isolation failed: %d, page count %d, type %lx (%pGp)\n",
>  			pfn, msg_page[huge], ret, page_count(page), page->flags, &page->flags);
> +		ret = -EBUSY;
>  	}
>  	return ret;
>  }
> -- 
> 2.11.0
> 
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ