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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 19 Aug 2022 06:47:16 +0000
From:   HORIGUCHI NAOYA(堀口 直也) 
        <naoya.horiguchi@....com>
To:     Kefeng Wang <wangkefeng.wang@...wei.com>
CC:     Miaohe Lin <linmiaohe@...wei.com>,
        Andrew Morton <akpm@...ux-foundation.org>,
        "linux-mm@...ck.org" <linux-mm@...ck.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 1/2] mm: memory-failure: kill soft_offline_free_page()

On Fri, Aug 19, 2022 at 11:34:01AM +0800, Kefeng Wang wrote:
> Open-code the page_handle_poison() into soft_offline_page() and
> kill unneeded soft_offline_free_page().
> 
> Signed-off-by: Kefeng Wang <wangkefeng.wang@...wei.com>

Thank you for sending cleanup patches.
This patch looks good to me,

Acked-by: Naoya Horiguchi <naoya.horiguchi@....com>

> ---
>  mm/memory-failure.c | 12 +-----------
>  1 file changed, 1 insertion(+), 11 deletions(-)
> 
> diff --git a/mm/memory-failure.c b/mm/memory-failure.c
> index e48f6f6a259d..1a7d6548ccb2 100644
> --- a/mm/memory-failure.c
> +++ b/mm/memory-failure.c
> @@ -2511,16 +2511,6 @@ static int soft_offline_in_use_page(struct page *page)
>  	return __soft_offline_page(page);
>  }
>  
> -static int soft_offline_free_page(struct page *page)
> -{
> -	int rc = 0;
> -
> -	if (!page_handle_poison(page, true, false))
> -		rc = -EBUSY;
> -
> -	return rc;
> -}
> -
>  static void put_ref_page(struct page *page)
>  {
>  	if (page)
> @@ -2598,7 +2588,7 @@ int soft_offline_page(unsigned long pfn, int flags)
>  	if (ret > 0) {
>  		ret = soft_offline_in_use_page(page);
>  	} else if (ret == 0) {
> -		if (soft_offline_free_page(page) && try_again) {
> +		if (!page_handle_poison(page, true, false) && try_again) {
>  			try_again = false;
>  			flags &= ~MF_COUNT_INCREASED;
>  			goto retry;
> -- 
> 2.35.3

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ