summaryrefslogtreecommitdiff
path: root/mm/memremap.c
diff options
context:
space:
mode:
authorMiaohe Lin <linmiaohe@huawei.com>2022-05-31 20:26:43 +0800
committerakpm <akpm@linux-foundation.org>2022-06-01 15:57:16 -0700
commita04e1928e2ead144dc2f369768bc0a0f3110af89 (patch)
tree00612c78f393649b8a9f75f1f64798a514fdc2aa /mm/memremap.c
parent547be963c99f1e9ebc1cfabf630f64601a98dd00 (diff)
mm/memremap: fix missing call to untrack_pfn() in pagemap_range()
We forget to call untrack_pfn() to pair with track_pfn_remap() when range is not allowed to hotplug. Fix it by jump err_kasan. Link: https://lkml.kernel.org/r/20220531122643.25249-1-linmiaohe@huawei.com Fixes: bca3feaa0764 ("mm/memory_hotplug: prevalidate the address range being added with platform") Signed-off-by: Miaohe Lin <linmiaohe@huawei.com> Reviewed-by: David Hildenbrand <david@redhat.com> Acked-by: Muchun Song <songmuchun@bytedance.com> Cc: Anshuman Khandual <anshuman.khandual@arm.com> Cc: Oscar Salvador <osalvador@suse.de> Cc: <stable@vger.kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'mm/memremap.c')
-rw-r--r--mm/memremap.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/memremap.c b/mm/memremap.c
index 2b92e97cb25b..b870a659eee6 100644
--- a/mm/memremap.c
+++ b/mm/memremap.c
@@ -214,7 +214,7 @@ static int pagemap_range(struct dev_pagemap *pgmap, struct mhp_params *params,
if (!mhp_range_allowed(range->start, range_len(range), !is_private)) {
error = -EINVAL;
- goto err_pfn_remap;
+ goto err_kasan;
}
mem_hotplug_begin();