lkml.org 
[lkml]   [2021]   [Mar]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
SubjectRe: [PATCH] mm,hwpoison: return -EBUSY when page already poisoned
Date
On Mon, Mar 08, 2021 at 06:54:02PM +0000, Luck, Tony wrote:
> >> So it should be safe to grab and hold a mutex. See patch below.
> >
> > The mutex approach looks simpler and safer, so I'm fine with it.
>
> Thanks. Is that an "Acked-by:"?

Not yet, I intended to add it after full patch is submitted
(with your Signed-off-by and commit log).

>
> >> /**
> >> * memory_failure - Handle memory failure of a page.
> >> * @pfn: Page Number of the corrupted page
> >> @@ -1424,12 +1426,18 @@ int memory_failure(unsigned long pfn, int flags)
> >> return -ENXIO;
> >> }
> >>
> >> + mutex_lock(&mf_mutex);
> >
> > Is it better to take mutex before memory_failure_dev_pagemap() block?
> > Or we don't have to protect against race for device memory?
>
> No races (recovery is only attempted for errors in normal memory).

OK, thanks.

- Naoya
\
 
 \ /
  Last update: 2021-03-08 23:40    [W:1.972 / U:1.272 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site