From: Andrew Morton <akpm@linux-foundation.org>
To: kernel test robot <lkp@intel.com>
Cc: Linux Memory Management List <linux-mm@kvack.org>,
Joao Martins <joao.m.martins@oracle.com>,
Vishal L Verma <vishal.l.verma@intel.com>,
Dan Williams <dan.j.williams@intel.com>
Subject: Re: [linux-next:master] BUILD REGRESSION 3a00d3dfd4b68b208ecd5405e676d06c8ad6bb63
Date: Tue, 25 Aug 2020 14:32:18 -0700 [thread overview]
Message-ID: <20200825143218.7fc406bf642ad7f0cc9cfb26@linux-foundation.org> (raw)
In-Reply-To: <5f457d73.gsRq3vmXOfOBWd0d%lkp@intel.com>
On Wed, 26 Aug 2020 05:06:59 +0800 kernel test robot <lkp@intel.com> wrote:
> drivers/dax/bus.c:626 alloc_dev_dax_range() error: potential null dereference 'alloc'. (__request_region returns null)
> drivers/dax/bus.c:626 alloc_dev_dax_range() error: we previously assumed 'alloc' could be null (see line 610)
yes, looks fishy:
alloc = __request_region(res, start, size, dev_name(dev), 0);
if (!alloc && !dev_dax->nr_range) {
/*
* If we adjusted an existing @ranges leave it alone,
* but if this was an empty set of ranges nothing else
* will release @ranges, so do it now.
*/
kfree(ranges);
return -ENOMEM;
}
...
.start = alloc->start,
Added by "[PATCH v4 18/23] device-dax: Add dis-contiguous resource
support",
https://lkml.kernel.org/r/159643104304.4062302.16561669534797528660.stgit@dwillia2-desk3.amr.corp.intel.com
> drivers/dax/device.c:111:21: warning: variable 'dax_region' set but not used [-Wunused-but-set-variable]
yup, "device-dax: make align a per-device property" needs
--- a/drivers/dax/device.c~device-dax-make-align-a-per-device-property-fix
+++ a/drivers/dax/device.c
@@ -108,7 +108,6 @@ static vm_fault_t __dev_dax_pmd_fault(st
{
unsigned long pmd_addr = vmf->address & PMD_MASK;
struct device *dev = &dev_dax->dev;
- struct dax_region *dax_region;
phys_addr_t phys;
pgoff_t pgoff;
unsigned int fault_size = PMD_SIZE;
@@ -116,7 +115,6 @@ static vm_fault_t __dev_dax_pmd_fault(st
if (check_vma(dev_dax, vmf->vma, __func__))
return VM_FAULT_SIGBUS;
- dax_region = dev_dax->region;
if (dev_dax->align > PMD_SIZE) {
dev_dbg(dev, "alignment (%#x) > fault size (%#x)\n",
dev_dax->align, fault_size);
@@ -151,7 +149,6 @@ static vm_fault_t __dev_dax_pud_fault(st
{
unsigned long pud_addr = vmf->address & PUD_MASK;
struct device *dev = &dev_dax->dev;
- struct dax_region *dax_region;
phys_addr_t phys;
pgoff_t pgoff;
unsigned int fault_size = PUD_SIZE;
@@ -160,7 +157,6 @@ static vm_fault_t __dev_dax_pud_fault(st
if (check_vma(dev_dax, vmf->vma, __func__))
return VM_FAULT_SIGBUS;
- dax_region = dev_dax->region;
if (dev_dax->align > PUD_SIZE) {
dev_dbg(dev, "alignment (%#x) > fault size (%#x)\n",
dev_dax->align, fault_size);
_
next prev parent reply other threads:[~2020-08-25 21:32 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-25 21:06 kernel test robot
2020-08-25 21:32 ` Andrew Morton [this message]
2020-08-26 16:13 ` Joao Martins
2020-08-26 18:32 ` Andrew Morton
2020-08-26 19:45 ` Joao Martins
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=20200825143218.7fc406bf642ad7f0cc9cfb26@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=dan.j.williams@intel.com \
--cc=joao.m.martins@oracle.com \
--cc=linux-mm@kvack.org \
--cc=lkp@intel.com \
--cc=vishal.l.verma@intel.com \
/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