mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-03-16 12:14:06 +00:00
mm/memremap: fix missing call to untrack_pfn() in pagemap_range()
commita04e1928e2
upstream. 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:bca3feaa07
("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> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
66eb210df7
commit
12731a1cda
1 changed files with 1 additions and 1 deletions
|
@ -245,7 +245,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();
|
||||
|
|
Loading…
Add table
Reference in a new issue