Jia He
b47215b374
mm/memory_hotplug: fix unpaired mem_hotplug_begin/done
...
commit b4223a510e2ab1bf0f971d50af7c1431014b25ad upstream.
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]
Fixes: f1037ec0cc8a ("mm/memory_hotplug: fix remove_memory() lockdep splat")
Signed-off-by: Jia He <justin.he@arm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Reviewed-by: David Hildenbrand <david@redhat.com>
Acked-by: Michal Hocko <mhocko@suse.com>
Acked-by: Dan Williams <dan.j.williams@intel.com>
Cc: <stable@vger.kernel.org> [5.6+]
Cc: Andy Lutomirski <luto@kernel.org>
Cc: Baoquan He <bhe@redhat.com>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Chuhong Yuan <hslester96@gmail.com>
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Cc: Dave Jiang <dave.jiang@intel.com>
Cc: Fenghua Yu <fenghua.yu@intel.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Jonathan Cameron <Jonathan.Cameron@Huawei.com>
Cc: Kaly Xin <Kaly.Xin@arm.com>
Cc: Logan Gunthorpe <logang@deltatee.com>
Cc: Masahiro Yamada <masahiroy@kernel.org>
Cc: Mike Rapoport <rppt@linux.ibm.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Rich Felker <dalias@libc.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Vishal Verma <vishal.l.verma@intel.com>
Cc: Will Deacon <will@kernel.org>
Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
Link: http://lkml.kernel.org/r/20200710031619.18762-3-justin.he@arm.com
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-08-21 13:05:27 +02:00
..
2020-05-27 17:46:48 +02:00
2020-05-14 07:58:30 +02:00
2019-09-04 07:42:01 -04:00
2019-07-12 12:24:03 -07:00
2019-05-14 09:47:45 -07:00
2019-07-16 19:23:21 -07:00
2020-07-09 09:37:57 +02:00
2020-03-05 16:43:51 +01:00
2019-07-12 11:05:46 -07:00
2017-12-11 14:54:44 +01:00
2019-08-30 22:43:58 -07:00
2019-07-12 11:05:43 -07:00
2020-08-05 09:59:41 +02:00
2019-09-25 17:51:41 -07:00
2019-06-19 17:09:52 +02:00
2020-01-09 10:20:00 +01:00
2020-06-17 16:40:30 +02:00
2018-12-28 12:11:47 -08:00
2019-09-07 04:28:04 -03:00
2020-06-22 09:31:14 +02:00
2019-11-15 18:34:00 -08:00
2020-04-29 16:33:14 +02:00
2019-06-03 15:39:40 +02:00
2019-10-19 06:32:32 -04:00
2020-01-09 10:19:55 +01:00
2019-06-19 17:09:08 +02:00
2019-09-24 15:54:11 -07:00
2019-09-24 15:54:08 -07:00
2020-08-21 13:05:26 +02:00
2019-06-05 17:37:06 +02:00
2019-10-14 08:56:16 -07:00
2020-04-29 16:33:15 +02:00
2019-07-12 11:05:44 -07:00
2020-01-17 19:48:40 +01:00
2020-03-25 08:25:57 +01:00
2019-09-24 15:54:10 -07:00
2019-10-19 06:32:32 -04:00
2020-07-29 10:18:43 +02:00
2019-09-24 15:54:08 -07:00
2020-08-21 13:05:27 +02:00
2019-10-19 06:32:31 -04:00
2020-01-09 10:19:55 +01:00
2020-04-08 09:08:47 +02:00
2019-03-05 21:07:20 -08:00
2020-01-09 10:19:56 +01:00
2020-02-11 04:35:13 -08:00
2019-09-25 17:51:41 -07:00
2019-09-25 17:51:41 -07:00
2019-05-21 10:50:45 +02:00
2020-08-19 08:16:02 +02:00
2020-02-11 04:35:42 -08:00
2019-11-06 08:47:50 -08:00
2020-03-12 13:00:19 +01:00
2020-06-07 13:18:46 +02:00
2019-09-25 17:51:41 -07:00
2020-03-25 08:25:58 +01:00
2020-01-09 10:19:57 +01:00
2020-06-22 09:31:14 +02:00
2020-08-21 13:05:27 +02:00
2019-10-14 15:04:00 -07:00
2019-06-29 16:43:45 +08:00
2019-11-15 18:34:00 -08:00
2019-07-12 11:05:43 -07:00
2019-10-19 06:32:31 -04:00
2019-09-24 15:54:08 -07:00
2019-09-24 15:54:08 -07:00
2020-01-23 08:22:41 +01:00
2019-09-07 04:28:04 -03:00
2019-03-13 12:25:31 -07:00
2019-06-05 17:37:16 +02:00
2019-06-05 17:37:16 +02:00
2019-06-05 17:37:16 +02:00
2019-09-04 13:40:49 -07:00
2018-10-09 16:51:11 +02:00
2019-05-30 11:26:32 -07:00
2019-05-21 10:50:45 +02:00
2019-10-19 06:32:32 -04:00
2019-06-05 17:37:17 +02:00
2020-05-20 08:20:03 +02:00
2019-10-07 15:47:19 -07:00
2019-05-14 19:52:48 -07:00
2020-07-29 10:18:44 +02:00
2020-01-23 08:22:40 +01:00
2019-11-06 08:47:50 -08:00
2019-10-07 15:47:20 -07:00
2020-07-09 09:37:50 +02:00
2019-07-18 17:08:07 -07:00
2020-04-01 11:02:03 +02:00
2018-08-22 10:52:44 -07:00
2020-07-09 09:37:49 +02:00
2019-09-25 17:51:41 -07:00
2020-04-01 11:02:02 +02:00
2019-10-19 06:32:33 -04:00
2019-09-17 15:20:17 -07:00
2019-06-19 17:09:53 +02:00
2020-06-17 16:40:23 +02:00
2018-09-13 15:18:04 -10:00
2020-04-29 16:33:14 +02:00
2019-10-07 15:47:19 -07:00
2020-02-28 17:22:20 +01:00
2019-11-06 08:47:50 -08:00
2019-08-13 16:06:52 -07:00
2019-10-07 15:47:19 -07:00
2019-05-21 10:50:45 +02:00
2019-09-24 15:54:12 -07:00
2020-01-09 10:19:56 +01:00
2019-09-24 15:54:12 -07:00