From: Dan Williams <dan.j.williams@intel.com>
To: David Hildenbrand <david@redhat.com>
Cc: Jia He <justin.he@arm.com>, Baoquan He <bhe@redhat.com>,
Kaly Xin <Kaly.Xin@arm.com>,
Catalin Marinas <catalin.marinas@arm.com>,
Chuhong Yuan <hslester96@gmail.com>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Mike Rapoport <rppt@linux.ibm.com>, Linux MM <linux-mm@kvack.org>,
Andrew Morton <akpm@linux-foundation.org>,
Michal Hocko <mhocko@kernel.org>, Will Deacon <will@kernel.org>,
Linux ARM <linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH 3/3] mm/memory_hotplug: fix unpaired mem_hotplug_begin/done
Date: Tue, 7 Jul 2020 15:10:22 -0700 [thread overview]
Message-ID: <CAPcyv4gYq=jHDniKGvg2zMGqojw4bR6X90DfXKS6fZzLRzZWJA@mail.gmail.com> (raw)
In-Reply-To: <0b015717-b5e1-451d-9fc3-ad665ed1054a@redhat.com>
On Mon, Jul 6, 2020 at 12:50 AM David Hildenbrand <david@redhat.com> wrote:
>
> On 06.07.20 03:19, Jia He wrote:
> > When check_memblock_offlined_cb() returns failed rc(e.g. the memblock is
> > online at that time), mem_hotplug_begin/done is unpaired in such case.
> >
> > Therefore a warning:
> > Call Trace:
> > percpu_up_write+0x33/0x40
> > try_remove_memory+0x66/0x120
> > ? _cond_resched+0x19/0x30
> > remove_memory+0x2b/0x40
> > dev_dax_kmem_remove+0x36/0x72 [kmem]
> > device_release_driver_internal+0xf0/0x1c0
> > device_release_driver+0x12/0x20
> > bus_remove_device+0xe1/0x150
> > device_del+0x17b/0x3e0
> > unregister_dev_dax+0x29/0x60
> > devm_action_release+0x15/0x20
> > release_nodes+0x19a/0x1e0
> > devres_release_all+0x3f/0x50
> > device_release_driver_internal+0x100/0x1c0
> > driver_detach+0x4c/0x8f
> > bus_remove_driver+0x5c/0xd0
> > driver_unregister+0x31/0x50
> > dax_pmem_exit+0x10/0xfe0 [dax_pmem]
> >
> > This fixes it by moving mem_hotplug_done ahead of "done"
> >
> > Signed-off-by: Jia He <justin.he@arm.com>
> > ---
> > mm/memory_hotplug.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c
> > index e1e290577b45..86b36714342b 100644
> > --- a/mm/memory_hotplug.c
> > +++ b/mm/memory_hotplug.c
> > @@ -1769,8 +1769,8 @@ static int __ref try_remove_memory(int nid, u64 start, u64 size)
> >
> > try_offline_node(nid);
> >
> > -done:
> > mem_hotplug_done();
> > +done:
> > return rc;
> > }
> >
> >
>
> Just drop the "done" label, use "return rc;" directly instead of the
> goto, and "return 0;" at the end.
>
> Also, please add
>
> Fixes: f1037ec0cc8a ("mm/memory_hotplug: fix remove_memory() lockdep splat")
>
> and
>
> Cc: stable@vger.kernel.org # v5.6+
>
> Thanks!
Yes, thanks, you can also add:
Acked-by: Dan Williams <dan.j.williams@intel.com>
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
prev parent reply other threads:[~2020-07-07 22:11 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-06 1:19 [PATCH 0/3] Fix and enable pmem as RAM on arm64 Jia He
2020-07-06 1:19 ` [PATCH 1/3] arm64/numa: set numa_off to false when numa node is fake Jia He
2020-07-06 8:02 ` David Hildenbrand
2020-07-06 12:36 ` Justin He
2020-07-06 13:56 ` David Hildenbrand
2020-07-06 10:29 ` Jonathan Cameron
2020-07-06 10:46 ` Jonathan Cameron
2020-07-06 12:47 ` Justin He
2020-07-06 13:03 ` Jonathan Cameron
2020-07-06 1:19 ` [PATCH 2/3] mm/memory_hotplug: harden try_offline_node against bogus nid Jia He
2020-07-06 7:57 ` David Hildenbrand
2020-07-06 13:45 ` Justin He
2020-07-06 1:19 ` [PATCH 3/3] mm/memory_hotplug: fix unpaired mem_hotplug_begin/done Jia He
2020-07-06 7:49 ` David Hildenbrand
2020-07-07 22:10 ` Dan Williams [this message]
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='CAPcyv4gYq=jHDniKGvg2zMGqojw4bR6X90DfXKS6fZzLRzZWJA@mail.gmail.com' \
--to=dan.j.williams@intel.com \
--cc=Kaly.Xin@arm.com \
--cc=akpm@linux-foundation.org \
--cc=bhe@redhat.com \
--cc=catalin.marinas@arm.com \
--cc=david@redhat.com \
--cc=hslester96@gmail.com \
--cc=justin.he@arm.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mhocko@kernel.org \
--cc=rppt@linux.ibm.com \
--cc=will@kernel.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;
as well as URLs for NNTP newsgroup(s).