[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <bfca2ab7-fbd3-1e7c-3128-c892c519697e@oracle.com>
Date: Thu, 6 Apr 2023 13:38:30 -0700
From: Jane Chu <jane.chu@...cle.com>
To: Matthew Wilcox <willy@...radead.org>
Cc: dan.j.williams@...el.com, vishal.l.verma@...el.com,
dave.jiang@...el.com, ira.weiny@...el.com, viro@...iv.linux.org.uk,
brauner@...nel.org, nvdimm@...ts.linux.dev,
linux-kernel@...r.kernel.org, linux-fsdevel@...r.kernel.org
Subject: Re: [PATCH] dax: enable dax fault handler to report VM_FAULT_HWPOISON
On 4/6/2023 12:32 PM, Matthew Wilcox wrote:
> On Thu, Apr 06, 2023 at 11:55:56AM -0600, Jane Chu wrote:
>> static vm_fault_t dax_fault_return(int error)
>> {
>> if (error == 0)
>> return VM_FAULT_NOPAGE;
>> - return vmf_error(error);
>> + else if (error == -ENOMEM)
>> + return VM_FAULT_OOM;
>> + else if (error == -EHWPOISON)
>> + return VM_FAULT_HWPOISON;
>> + return VM_FAULT_SIGBUS;
>> }
>
> Why would we want to handle it here instead of changing vmf_error()?
I think it's related to the comment about the the corrupted range of
a hwpoison caused fault - something no need to worry about now.
I will move the change to vmf_error() in a respin.
Thanks!
-jane
Powered by blists - more mailing lists