From: Jia He <justin.he@arm.com> To: Catalin Marinas <catalin.marinas@arm.com>, Will Deacon <will@kernel.org> Cc: Andrew Morton <akpm@linux-foundation.org>, Mike Rapoport <rppt@linux.ibm.com>, Baoquan He <bhe@redhat.com>, Chuhong Yuan <hslester96@gmail.com>, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, Kaly Xin <Kaly.Xin@arm.com>, Jia He <justin.he@arm.com> Subject: [PATCH 3/3] mm/memory_hotplug: fix unpaired mem_hotplug_begin/done Date: Mon, 6 Jul 2020 09:19:47 +0800 [thread overview] Message-ID: <20200706011947.184166-4-justin.he@arm.com> (raw) In-Reply-To: <20200706011947.184166-1-justin.he@arm.com> 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; } -- 2.17.1
WARNING: multiple messages have this Message-ID (diff)
From: Jia He <justin.he@arm.com> To: Catalin Marinas <catalin.marinas@arm.com>, Will Deacon <will@kernel.org> Cc: Jia He <justin.he@arm.com>, Baoquan He <bhe@redhat.com>, Kaly Xin <Kaly.Xin@arm.com>, Chuhong Yuan <hslester96@gmail.com>, linux-kernel@vger.kernel.org, Mike Rapoport <rppt@linux.ibm.com>, linux-mm@kvack.org, Andrew Morton <akpm@linux-foundation.org>, linux-arm-kernel@lists.infradead.org Subject: [PATCH 3/3] mm/memory_hotplug: fix unpaired mem_hotplug_begin/done Date: Mon, 6 Jul 2020 09:19:47 +0800 [thread overview] Message-ID: <20200706011947.184166-4-justin.he@arm.com> (raw) In-Reply-To: <20200706011947.184166-1-justin.he@arm.com> 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; } -- 2.17.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2020-07-06 1:20 UTC|newest] Thread overview: 36+ 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 ` 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 1:19 ` Jia He 2020-07-06 8:02 ` David Hildenbrand 2020-07-06 8:02 ` David Hildenbrand 2020-07-06 12:36 ` Justin He 2020-07-06 12:36 ` Justin He 2020-07-06 12:36 ` Justin He 2020-07-06 13:56 ` David Hildenbrand 2020-07-06 13:56 ` David Hildenbrand 2020-07-06 13:56 ` David Hildenbrand 2020-07-06 10:29 ` Jonathan Cameron 2020-07-06 10:29 ` Jonathan Cameron 2020-07-06 10:46 ` Jonathan Cameron 2020-07-06 10:46 ` Jonathan Cameron 2020-07-06 12:47 ` Justin He 2020-07-06 12:47 ` Justin He 2020-07-06 12:47 ` Justin He 2020-07-06 13:03 ` Jonathan Cameron 2020-07-06 13:03 ` Jonathan Cameron 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 1:19 ` Jia He 2020-07-06 7:57 ` David Hildenbrand 2020-07-06 7:57 ` David Hildenbrand 2020-07-06 13:45 ` Justin He 2020-07-06 13:45 ` Justin He 2020-07-06 13:45 ` Justin He 2020-07-06 1:19 ` Jia He [this message] 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-06 7:49 ` David Hildenbrand 2020-07-07 22:10 ` Dan Williams 2020-07-07 22:10 ` Dan Williams 2020-07-07 22:10 ` Dan Williams
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=20200706011947.184166-4-justin.he@arm.com \ --to=justin.he@arm.com \ --cc=Kaly.Xin@arm.com \ --cc=akpm@linux-foundation.org \ --cc=bhe@redhat.com \ --cc=catalin.marinas@arm.com \ --cc=hslester96@gmail.com \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-mm@kvack.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: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.