linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: kbuild@lists.01.org,
	Anshuman Khandual <anshuman.khandual@arm.com>,
	lkp@intel.com, kbuild-all@lists.01.org,
	Linux Memory Management List <linux-mm@kvack.org>,
	David Hildenbrand <david@redhat.com>,
	Oscar Salvador <osalvador@suse.de>
Subject: Re: [linux-next:master 10191/10581] mm/memremap.c:270 pagemap_range() warn: missing error code 'error'
Date: Thu, 18 Feb 2021 14:29:06 -0800	[thread overview]
Message-ID: <20210218142906.b789221a9f87eaf089034a97@linux-foundation.org> (raw)
In-Reply-To: <20210215124053.GJ2087@kadam>

On Mon, 15 Feb 2021 15:40:53 +0300 Dan Carpenter <dan.carpenter@oracle.com> 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@intel.com>
> Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
> 
> 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();
 
_




      reply	other threads:[~2021-02-18 22:29 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-15 12:40 [linux-next:master 10191/10581] mm/memremap.c:270 pagemap_range() warn: missing error code 'error' Dan Carpenter
2021-02-18 22:29 ` Andrew Morton [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210218142906.b789221a9f87eaf089034a97@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=anshuman.khandual@arm.com \
    --cc=dan.carpenter@oracle.com \
    --cc=david@redhat.com \
    --cc=kbuild-all@lists.01.org \
    --cc=kbuild@lists.01.org \
    --cc=linux-mm@kvack.org \
    --cc=lkp@intel.com \
    --cc=osalvador@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).