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: <Yd+H00eSqZb+RsTv@agluck-desk2.amr.corp.intel.com>
Date:   Wed, 12 Jan 2022 18:00:51 -0800
From:   "Luck, Tony" <tony.luck@...el.com>
To:     Naoya Horiguchi <naoya.horiguchi@...ux.dev>
Cc:     Andrew Morton <akpm@...ux-foundation.org>, linux-mm@...ck.org,
        linux-kernel@...r.kernel.org,
        Youquan Song <youquan.song@...el.com>,
        Naoya Horiguchi <naoya.horiguchi@....com>
Subject: Re: [PATCH] mm/hwpoison: Fix error page recovered but reported "not
 recovered"

On Wed, Jan 12, 2022 at 09:11:45PM +0900, Naoya Horiguchi wrote:
> On Fri, Jan 07, 2022 at 11:44:50AM -0800, Tony Luck wrote:
> > From: Youquan Song <youquan.song@...el.com>

> diff --git a/mm/memory-failure.c b/mm/memory-failure.c
> index 14ae5c18e776..4c9bd1d37301 100644
> --- a/mm/memory-failure.c
> +++ b/mm/memory-failure.c
> @@ -707,8 +707,10 @@ static int kill_accessing_process(struct task_struct *p, unsigned long pfn,
>  			      (void *)&priv);
>  	if (ret == 1 && priv.tk.addr)
>  		kill_proc(&priv.tk, pfn, flags);
> +	else
> +		ret = 0;
>  	mmap_read_unlock(p->mm);
> -	return ret ? -EFAULT : -EHWPOISON;
> +	return ret > 0 ? -EHWPOISON : -EFAULT;
>  }
>  
>  static const char *action_name[] = {

Yes. This fixes the problem (and your explanation helped
me understand this code better).

Fell free to take any words you need from the original patch
comment and switch to:

Reported-by: Youquan Song <youquan.song@...el.com>

Thanks for looking (and fixing!)

-Tony

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ