Re: [linux-next:master 10191/10581] mm/memremap.c:270 pagemap_range() warn: missing error code 'error'

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 15 Feb 2021 15:40:53 +0300 Dan Carpenter <dan.carpenter@xxxxxxxxxx> wrote:

> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
> head:   671176b0016c80b3943cb5387312c886aba3308d
> commit: 719fa3d6ddb50d3035c713c27feeae8b249eb586 [10191/10581] mm/memory_hotplug: prevalidate the address range being added with platform
> config: x86_64-randconfig-m001-20210211 (attached as .config)
> compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
> 
> If you fix the issue, kindly add following tag as appropriate
> Reported-by: kernel test robot <lkp@xxxxxxxxx>
> Reported-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>
> 
> smatch warnings:
> mm/memremap.c:270 pagemap_range() warn: missing error code 'error'
> 

Thanks, I did this:

--- 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();
 
_






[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux