From: "HORIGUCHI NAOYA(堀口 直也)" <naoya.horiguchi@nec.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Naoya Horiguchi <nao.horiguchi@gmail.com>,
"linux-mm@kvack.org" <linux-mm@kvack.org>,
Linus Torvalds <torvalds@linux-foundation.org>,
Oscar Salvador <osalvador@suse.de>,
Michal Hocko <mhocko@suse.com>, Tony Luck <tony.luck@intel.com>,
Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v3] mm/hwpoison: do not lock page again when me_huge_page() successfully recovers
Date: Tue, 15 Jun 2021 03:58:47 +0000 [thread overview]
Message-ID: <20210615035846.GA1807446@hori.linux.bs1.fc.nec.co.jp> (raw)
In-Reply-To: <20210614193528.c2cc50d92eb76c4bea1b40e8@linux-foundation.org>
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@nec.com> 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.
>
next prev parent reply other threads:[~2021-06-15 3:58 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-09 7:20 Naoya Horiguchi
[not found] ` <20210610165059.6618498250f60674c1bb9c03@linux-foundation.org>
[not found] ` <20210611002329.GA1201351@hori.linux.bs1.fc.nec.co.jp>
2021-06-15 2:35 ` Andrew Morton
2021-06-15 3:58 ` HORIGUCHI NAOYA(堀口 直也) [this message]
2021-06-15 23:48 ` Andrew Morton
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210615035846.GA1807446@hori.linux.bs1.fc.nec.co.jp \
--to=naoya.horiguchi@nec.com \
--cc=akpm@linux-foundation.org \
--cc=aneesh.kumar@linux.vnet.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mhocko@suse.com \
--cc=nao.horiguchi@gmail.com \
--cc=osalvador@suse.de \
--cc=tony.luck@intel.com \
--cc=torvalds@linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox