Skip to content

Commit a04e192

Browse files
MiaoheLinakpm00
authored andcommitted
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/[email protected] Fixes: bca3fea ("mm/memory_hotplug: prevalidate the address range being added with platform") Signed-off-by: Miaohe Lin <[email protected]> Reviewed-by: David Hildenbrand <[email protected]> Acked-by: Muchun Song <[email protected]> Cc: Anshuman Khandual <[email protected]> Cc: Oscar Salvador <[email protected]> Cc: <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
1 parent 547be96 commit a04e192

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mm/memremap.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ static int pagemap_range(struct dev_pagemap *pgmap, struct mhp_params *params,
214214

215215
if (!mhp_range_allowed(range->start, range_len(range), !is_private)) {
216216
error = -EINVAL;
217-
goto err_pfn_remap;
217+
goto err_kasan;
218218
}
219219

220220
mem_hotplug_begin();

0 commit comments

Comments
 (0)