The patch titled Subject: mm-memory_hotplug-prevalidate-the-address-range-being-added-with-platform-fix has been added to the -mm tree. Its filename is mm-memory_hotplug-prevalidate-the-address-range-being-added-with-platform-fix.patch This patch should soon appear at https://ozlabs.org/~akpm/mmots/broken-out/mm-memory_hotplug-prevalidate-the-address-range-being-added-with-platform-fix.patch and later at https://ozlabs.org/~akpm/mmotm/broken-out/mm-memory_hotplug-prevalidate-the-address-range-being-added-with-platform-fix.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/process/submit-checklist.rst when testing your code *** The -mm tree is included into linux-next and is updated there every 3-4 working days ------------------------------------------------------ From: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> Subject: mm-memory_hotplug-prevalidate-the-address-range-being-added-with-platform-fix make pagemap_range() return -EINVAL when mhp_range_allowed() fails Reported-by: kernel test robot <lkp@xxxxxxxxx> Reported-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx> Cc: Anshuman Khandual <anshuman.khandual@xxxxxxx> Cc: Ard Biesheuvel <ardb@xxxxxxxxxx> Cc: Catalin Marinas <catalin.marinas@xxxxxxx> Cc: David Hildenbrand <david@xxxxxxxxxx> Cc: Heiko Carstens <hca@xxxxxxxxxxxxx> Cc: Jason Wang <jasowang@xxxxxxxxxx> Cc: Jonathan Cameron <Jonathan.Cameron@xxxxxxxxxx> Cc: Mark Rutland <mark.rutland@xxxxxxx> Cc: "Michael S. Tsirkin" <mst@xxxxxxxxxx> Cc: Michal Hocko <mhocko@xxxxxxxxxx> Cc: Oscar Salvador <osalvador@xxxxxxx> Cc: Pankaj Gupta <pankaj.gupta@xxxxxxxxxxxxxxx> Cc: Pankaj Gupta <pankaj.gupta.linux@xxxxxxxxx> Cc: teawater <teawaterz@xxxxxxxxxxxxxxxxx> Cc: Vasily Gorbik <gor@xxxxxxxxxxxxx> Cc: Wei Yang <richard.weiyang@xxxxxxxxxxxxxxxxx> Cc: Will Deacon <will@xxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- mm/memremap.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) --- a/mm/memremap.c~mm-memory_hotplug-prevalidate-the-address-range-being-added-with-platform-fix +++ a/mm/memremap.c @@ -266,8 +266,10 @@ static int pagemap_range(struct dev_page if (error) goto err_pfn_remap; - if (!mhp_range_allowed(range->start, range_len(range), !is_private)) + if (!mhp_range_allowed(range->start, range_len(range), !is_private)) { + error = -EINVAL; goto err_pfn_remap; + } mem_hotplug_begin(); _ Patches currently in -mm which might be from akpm@xxxxxxxxxxxxxxxxxxxx are mm.patch mm-memcg-slab-pre-allocate-obj_cgroups-for-slab-caches-with-slab_account-fix.patch mm-memcontrol-optimize-per-lruvec-stats-counter-memory-usage-checkpatch-fixes.patch mm-memcg-add-swapcache-stat-for-memcg-v2-fix.patch kasan-add-match-all-tag-tests-fix-fix.patch mm-cma-allocate-cma-areas-bottom-up-fix-3-fix.patch mm-vmstat-fix-proc-sys-vm-stat_refresh-generating-false-warnings-fix-2.patch mm-memory_hotplug-prevalidate-the-address-range-being-added-with-platform-fix.patch bdi-use-might_alloc-fix.patch kfence-kasan-make-kfence-compatible-with-kasan-fix.patch lib-stackdepot-add-support-to-disable-stack-depot-fix.patch seq_file-document-how-per-entry-resources-are-managed-fix.patch initramfs-panic-with-memory-information-fix.patch linux-next-rejects.patch fs-ramfs-inodec-update-inode_operationstmpfile.patch kernel-forkc-export-kernel_thread-to-modules.patch