On Mon, Jun 14, 2021 at 07:35:28PM -0700, Andrew Morton wrote: > On Fri, 11 Jun 2021 00:23:29 +0000 HORIGUCHI NAOYA(堀口 直也) <naoya.horiguchi@xxxxxxx> wrote: > > > > > > > --- mm/memory-failure.c > > > +++ mm/memory-failure.c > > > @@ -1782,6 +1796,8 @@ int memory_failure(unsigned long pfn, int flags) > > > > > > identify_page_state: > > > res = identify_page_state(pfn, p, page_flags); > > > + mutex_unlock(&mf_mutex); > > > + return res; > > > unlock_page: > > > unlock_page(p); > > > unlock_mutex: > > > > > > and... That mutex_unlock() looks odd. The patch adds no matching > > > mutex_lock? > > > > Yes, memory_failure() already has one mutex_lock (introduced by > > mm-memory-failure-use-a-mutex-to-avoid-memory_failure-races.patch, > > sorry for not clarifying that), and the change introduces a separate > > return path. But I now think that I should have used "goto unlock_mutex" > > to use existing return path. > > But mm-memory-failure-use-a-mutex-to-avoid-memory_failure-races.patch > is part of Tony's three patch series which is not marked for -stable. > So it isn't appropriate that this patch be based on top of that three > patch series. > > Should Tony's patchset also be targeted to -stable? If so then OK. Yes, that's fine. And I think that the first two patches (mm-memory-failure-use-a-mutex-to-avoid-memory_failure-races.pathc and mmhwpoison-return-ehwpoison-to-denote-that-the-page-has-already-been-poisoned.patch) can be marked to stable, but 3/3 (mmhwpoison-send-sigbus-with-error-virutal-address.patch) may not because it's a little too large and not the main part of the fixes. Thanks, Naoya Horiguchi > > If not then please let's prepare your -stable patch against current > mainline, as it is higher priority than the 5.14-rc1 material in > linux-next. >