* [linux-next:master] BUILD REGRESSION 3a00d3dfd4b68b208ecd5405e676d06c8ad6bb63
@ 2020-08-25 21:06 kernel test robot
2020-08-25 21:32 ` Andrew Morton
0 siblings, 1 reply; 5+ messages in thread
From: kernel test robot @ 2020-08-25 21:06 UTC (permalink / raw)
To: Andrew Morton; +Cc: Linux Memory Management List
tree/branch: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
branch HEAD: 3a00d3dfd4b68b208ecd5405e676d06c8ad6bb63 Add linux-next specific files for 20200825
Error/Warning in current branch:
arch/x86/events/intel/uncore_snb.c:441:37: warning: initialized field overwritten [-Woverride-init]
arch/x86/mm/numa.c:907:5: warning: no previous prototype for 'phys_to_target_node' [-Wmissing-prototypes]
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)
drivers/dax/device.c:111:21: warning: variable 'dax_region' set but not used [-Wunused-but-set-variable]
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_debugfs.c:1411 dp_dsc_slice_height_write() warn: inconsistent indenting
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/smu7_smumgr.c:408:44: sparse: expected void volatile [noderef] __iomem *d
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/smumgr/smu7_smumgr.c:408:44: sparse: sparse: incorrect type in argument 1 (different address spaces)
drivers/gpu/drm/nouveau/dispnv50/base507c.c:46:9: sparse: sparse: cast removes address space '__iomem' of expression
drivers/gpu/drm/nouveau/dispnv50/base827c.c:37:9: sparse: sparse: cast removes address space '__iomem' of expression
drivers/gpu/drm/nouveau/dispnv50/base907c.c:37:9: sparse: sparse: cast removes address space '__iomem' of expression
drivers/gpu/drm/nouveau/dispnv50/core507d.c:43:17: sparse: sparse: cast removes address space '__iomem' of expression
drivers/gpu/drm/nouveau/dispnv50/corec37d.c:44:17: sparse: sparse: cast removes address space '__iomem' of expression
drivers/gpu/drm/nouveau/dispnv50/corec57d.c:39:9: sparse: sparse: cast removes address space '__iomem' of expression
drivers/gpu/drm/nouveau/dispnv50/dac507d.c:44:9: sparse: sparse: cast removes address space '__iomem' of expression
drivers/gpu/drm/nouveau/dispnv50/dac907d.c:38:9: sparse: sparse: cast removes address space '__iomem' of expression
drivers/gpu/drm/nouveau/dispnv50/head507d.c:39:9: sparse: sparse: cast removes address space '__iomem' of expression
drivers/gpu/drm/nouveau/dispnv50/head827d.c:39:9: sparse: sparse: cast removes address space '__iomem' of expression
drivers/gpu/drm/nouveau/dispnv50/head907d.c:46:9: sparse: sparse: cast removes address space '__iomem' of expression
drivers/gpu/drm/nouveau/dispnv50/headc37d.c:55:9: sparse: sparse: cast removes address space '__iomem' of expression
drivers/gpu/drm/nouveau/dispnv50/headc57d.c:55:9: sparse: sparse: cast removes address space '__iomem' of expression
drivers/gpu/drm/nouveau/dispnv50/ovly507e.c:44:9: sparse: sparse: cast removes address space '__iomem' of expression
drivers/gpu/drm/nouveau/dispnv50/ovly827e.c:41:9: sparse: sparse: cast removes address space '__iomem' of expression
drivers/gpu/drm/nouveau/dispnv50/ovly907e.c:38:9: sparse: sparse: cast removes address space '__iomem' of expression
drivers/gpu/drm/nouveau/dispnv50/pior507d.c:45:9: sparse: sparse: cast removes address space '__iomem' of expression
drivers/gpu/drm/nouveau/dispnv50/sor507d.c:45:9: sparse: sparse: cast removes address space '__iomem' of expression
drivers/gpu/drm/nouveau/dispnv50/sor907d.c:41:9: sparse: sparse: cast removes address space '__iomem' of expression
drivers/gpu/drm/nouveau/dispnv50/sorc37d.c:38:9: sparse: sparse: cast removes address space '__iomem' of expression
drivers/gpu/drm/nouveau/dispnv50/wimmc37b.c:40:9: sparse: sparse: cast removes address space '__iomem' of expression
drivers/gpu/drm/nouveau/dispnv50/wndwc37e.c:49:9: sparse: sparse: cast removes address space '__iomem' of expression
drivers/gpu/drm/nouveau/dispnv50/wndwc57e.c:43:9: sparse: sparse: cast removes address space '__iomem' of expression
drivers/leds/leds-lp5521.c:368 lp5521_multicolor_brightness() error: uninitialized symbol 'ret'.
drivers/md/raid5.c:2665 raid5_end_write_request() error: uninitialized symbol 'rdev'.
drivers/nvdimm/e820.c:24:12: error: implicit declaration of function 'phys_to_target_node' [-Werror,-Wimplicit-function-declaration]
drivers/nvdimm/e820.c:24:12: error: implicit declaration of function 'phys_to_target_node' [-Werror=implicit-function-declaration]
drivers/scsi/ufs/ufshcd.c:6638 ufshcd_reset_and_restore() error: double unlocked '*hba->host->host_lock' (orig line 6619)
drivers/scsi/ufs/ufshcd.c:7465 ufshcd_probe_hba() error: double unlocked '*hba->host->host_lock' (orig line 7457)
drivers/staging/hikey9xx/hisi-spmi-controller.c:124:4: warning: format '%ld' expects argument of type 'long int', but argument 4 has type 'size_t' {aka 'unsigned int'} [-Wformat=]
fs/notify/fsnotify.c:460 fsnotify() warn: variable dereferenced before check 'inode' (see line 449)
fs/proc/task_mmu.c:947 show_smaps_rollup() error: double unlocked 'mm->mmap_lock' (orig line 879)
fs/xfs/libxfs/xfs_bmap.c:5851 xfs_bmap_collapse_extents() warn: Function too hairy. No more merges.
ld: net/core/fib_rules.c:284: undefined reference to `fib6_rule_match'
ld: net/core/fib_rules.c:318: undefined reference to `fib6_rule_action'
ld: net/core/fib_rules.c:323: undefined reference to `fib6_rule_suppress'
net/core/fib_rules.c:284: undefined reference to `fib6_rule_match'
net/core/fib_rules.c:318: undefined reference to `fib6_rule_action'
sound/soc/sof/intel/hda-codec.c:182:1: warning: unused label 'error' [-Wunused-label]
Error/Warning ids grouped by kconfigs:
gcc_recent_errors
|-- arc-allyesconfig
| `-- drivers-staging-hikey9xx-hisi-spmi-controller.c:warning:format-ld-expects-argument-of-type-long-int-but-argument-has-type-size_t-aka-unsigned-int
|-- arm-allmodconfig
| `-- drivers-staging-hikey9xx-hisi-spmi-controller.c:warning:format-ld-expects-argument-of-type-long-int-but-argument-has-type-size_t-aka-unsigned-int
|-- arm-allyesconfig
| `-- drivers-staging-hikey9xx-hisi-spmi-controller.c:warning:format-ld-expects-argument-of-type-long-int-but-argument-has-type-size_t-aka-unsigned-int
|-- arm64-allyesconfig
| `-- drivers-dax-device.c:warning:variable-dax_region-set-but-not-used
|-- c6x-allyesconfig
| `-- drivers-staging-hikey9xx-hisi-spmi-controller.c:warning:format-ld-expects-argument-of-type-long-int-but-argument-has-type-size_t-aka-unsigned-int
|-- i386-allyesconfig
| |-- arch-x86-events-intel-uncore_snb.c:warning:initialized-field-overwritten
| `-- drivers-staging-hikey9xx-hisi-spmi-controller.c:warning:format-ld-expects-argument-of-type-long-int-but-argument-has-type-size_t-aka-unsigned-int
|-- i386-defconfig
| `-- arch-x86-events-intel-uncore_snb.c:warning:initialized-field-overwritten
|-- i386-randconfig-a001-20200825
| `-- arch-x86-events-intel-uncore_snb.c:warning:initialized-field-overwritten
|-- i386-randconfig-a003-20200825
| |-- arch-x86-events-intel-uncore_snb.c:warning:initialized-field-overwritten
| `-- drivers-dax-device.c:warning:variable-dax_region-set-but-not-used
|-- i386-randconfig-a004-20200825
| `-- arch-x86-events-intel-uncore_snb.c:warning:initialized-field-overwritten
|-- i386-randconfig-a005-20200825
| `-- arch-x86-events-intel-uncore_snb.c:warning:initialized-field-overwritten
|-- i386-randconfig-a011-20200825
| `-- arch-x86-events-intel-uncore_snb.c:warning:initialized-field-overwritten
|-- i386-randconfig-a013-20200825
| `-- arch-x86-events-intel-uncore_snb.c:warning:initialized-field-overwritten
|-- i386-randconfig-a014-20200825
| `-- arch-x86-events-intel-uncore_snb.c:warning:initialized-field-overwritten
|-- i386-randconfig-a015-20200825
| `-- arch-x86-events-intel-uncore_snb.c:warning:initialized-field-overwritten
|-- i386-randconfig-a016-20200825
| `-- arch-x86-events-intel-uncore_snb.c:warning:initialized-field-overwritten
|-- i386-randconfig-c001-20200825
| `-- arch-x86-events-intel-uncore_snb.c:warning:initialized-field-overwritten
|-- i386-randconfig-m021-20200825
| `-- drivers-gpu-drm-amd-amdgpu-..-display-amdgpu_dm-amdgpu_dm_debugfs.c-dp_dsc_slice_height_write()-warn:inconsistent-indenting
|-- i386-randconfig-m021-20200826
| `-- arch-x86-events-intel-uncore_snb.c:warning:initialized-field-overwritten
|-- i386-randconfig-s001-20200825
| `-- arch-x86-events-intel-uncore_snb.c:warning:initialized-field-overwritten
|-- i386-randconfig-s002-20200825
| |-- arch-x86-events-intel-uncore_snb.c:warning:initialized-field-overwritten
| |-- drivers-dax-device.c:warning:variable-dax_region-set-but-not-used
| |-- drivers-gpu-drm-nouveau-dispnv50-base507c.c:sparse:sparse:cast-removes-address-space-__iomem-of-expression
| |-- drivers-gpu-drm-nouveau-dispnv50-base827c.c:sparse:sparse:cast-removes-address-space-__iomem-of-expression
| |-- drivers-gpu-drm-nouveau-dispnv50-base907c.c:sparse:sparse:cast-removes-address-space-__iomem-of-expression
| |-- drivers-gpu-drm-nouveau-dispnv50-core507d.c:sparse:sparse:cast-removes-address-space-__iomem-of-expression
| |-- drivers-gpu-drm-nouveau-dispnv50-corec37d.c:sparse:sparse:cast-removes-address-space-__iomem-of-expression
| |-- drivers-gpu-drm-nouveau-dispnv50-corec57d.c:sparse:sparse:cast-removes-address-space-__iomem-of-expression
| |-- drivers-gpu-drm-nouveau-dispnv50-dac507d.c:sparse:sparse:cast-removes-address-space-__iomem-of-expression
| |-- drivers-gpu-drm-nouveau-dispnv50-dac907d.c:sparse:sparse:cast-removes-address-space-__iomem-of-expression
| |-- drivers-gpu-drm-nouveau-dispnv50-head507d.c:sparse:sparse:cast-removes-address-space-__iomem-of-expression
| |-- drivers-gpu-drm-nouveau-dispnv50-head827d.c:sparse:sparse:cast-removes-address-space-__iomem-of-expression
| |-- drivers-gpu-drm-nouveau-dispnv50-head907d.c:sparse:sparse:cast-removes-address-space-__iomem-of-expression
| |-- drivers-gpu-drm-nouveau-dispnv50-headc37d.c:sparse:sparse:cast-removes-address-space-__iomem-of-expression
| |-- drivers-gpu-drm-nouveau-dispnv50-headc57d.c:sparse:sparse:cast-removes-address-space-__iomem-of-expression
| |-- drivers-gpu-drm-nouveau-dispnv50-ovly507e.c:sparse:sparse:cast-removes-address-space-__iomem-of-expression
| |-- drivers-gpu-drm-nouveau-dispnv50-ovly827e.c:sparse:sparse:cast-removes-address-space-__iomem-of-expression
| |-- drivers-gpu-drm-nouveau-dispnv50-ovly907e.c:sparse:sparse:cast-removes-address-space-__iomem-of-expression
| |-- drivers-gpu-drm-nouveau-dispnv50-pior507d.c:sparse:sparse:cast-removes-address-space-__iomem-of-expression
| |-- drivers-gpu-drm-nouveau-dispnv50-sor507d.c:sparse:sparse:cast-removes-address-space-__iomem-of-expression
| |-- drivers-gpu-drm-nouveau-dispnv50-sor907d.c:sparse:sparse:cast-removes-address-space-__iomem-of-expression
| |-- drivers-gpu-drm-nouveau-dispnv50-sorc37d.c:sparse:sparse:cast-removes-address-space-__iomem-of-expression
| |-- drivers-gpu-drm-nouveau-dispnv50-wimmc37b.c:sparse:sparse:cast-removes-address-space-__iomem-of-expression
| |-- drivers-gpu-drm-nouveau-dispnv50-wndwc37e.c:sparse:sparse:cast-removes-address-space-__iomem-of-expression
| `-- drivers-gpu-drm-nouveau-dispnv50-wndwc57e.c:sparse:sparse:cast-removes-address-space-__iomem-of-expression
|-- m68k-allmodconfig
| `-- drivers-staging-hikey9xx-hisi-spmi-controller.c:warning:format-ld-expects-argument-of-type-long-int-but-argument-has-type-size_t-aka-unsigned-int
|-- m68k-allyesconfig
| `-- drivers-staging-hikey9xx-hisi-spmi-controller.c:warning:format-ld-expects-argument-of-type-long-int-but-argument-has-type-size_t-aka-unsigned-int
|-- mips-allmodconfig
| `-- drivers-staging-hikey9xx-hisi-spmi-controller.c:warning:format-ld-expects-argument-of-type-long-int-but-argument-has-type-size_t-aka-unsigned-int
|-- mips-allyesconfig
| `-- drivers-staging-hikey9xx-hisi-spmi-controller.c:warning:format-ld-expects-argument-of-type-long-int-but-argument-has-type-size_t-aka-unsigned-int
|-- nds32-allyesconfig
| `-- drivers-staging-hikey9xx-hisi-spmi-controller.c:warning:format-ld-expects-argument-of-type-long-int-but-argument-has-type-size_t-aka-unsigned-int
|-- nios2-allyesconfig
| `-- drivers-staging-hikey9xx-hisi-spmi-controller.c:warning:format-ld-expects-argument-of-type-long-int-but-argument-has-type-size_t-aka-unsigned-int
|-- nios2-randconfig-m031-20200825
| |-- drivers-dax-bus.c-alloc_dev_dax_range()-error:potential-null-dereference-alloc-.-(__request_region-returns-null)
| |-- drivers-dax-bus.c-alloc_dev_dax_range()-error:we-previously-assumed-alloc-could-be-null-(see-line-)
| |-- drivers-leds-leds-lp5521.c-lp5521_multicolor_brightness()-error:uninitialized-symbol-ret-.
| |-- drivers-md-raid5.c-raid5_end_write_request()-error:uninitialized-symbol-rdev-.
| |-- fs-notify-fsnotify.c-fsnotify()-warn:variable-dereferenced-before-check-inode-(see-line-)
| `-- fs-proc-task_mmu.c-show_smaps_rollup()-error:double-unlocked-mm-mmap_lock-(orig-line-)
|-- parisc-allyesconfig
| `-- drivers-staging-hikey9xx-hisi-spmi-controller.c:warning:format-ld-expects-argument-of-type-long-int-but-argument-has-type-size_t-aka-unsigned-int
|-- powerpc-randconfig-s031-20200825
| |-- drivers-gpu-drm-amd-amdgpu-..-pm-powerplay-smumgr-smu7_smumgr.c:sparse:expected-void-volatile-noderef-__iomem-d
| `-- drivers-gpu-drm-amd-amdgpu-..-pm-powerplay-smumgr-smu7_smumgr.c:sparse:sparse:incorrect-type-in-argument-(different-address-spaces)-expected-void-volatile-noderef-__iomem-d-got-void-kaddr
|-- sh-allmodconfig
| `-- drivers-staging-hikey9xx-hisi-spmi-controller.c:warning:format-ld-expects-argument-of-type-long-int-but-argument-has-type-size_t-aka-unsigned-int
|-- sparc-allyesconfig
| `-- drivers-dax-device.c:warning:variable-dax_region-set-but-not-used
|-- x86_64-allyesconfig
| `-- arch-x86-events-intel-uncore_snb.c:warning:initialized-field-overwritten
|-- x86_64-defconfig
| `-- arch-x86-events-intel-uncore_snb.c:warning:initialized-field-overwritten
|-- x86_64-kexec
| `-- arch-x86-events-intel-uncore_snb.c:warning:initialized-field-overwritten
|-- x86_64-randconfig-a001-20200825
| `-- arch-x86-events-intel-uncore_snb.c:warning:initialized-field-overwritten
|-- x86_64-randconfig-a002-20200825
| `-- arch-x86-events-intel-uncore_snb.c:warning:initialized-field-overwritten
|-- x86_64-randconfig-a004-20200825
| `-- arch-x86-events-intel-uncore_snb.c:warning:initialized-field-overwritten
|-- x86_64-randconfig-a005-20200825
| `-- arch-x86-events-intel-uncore_snb.c:warning:initialized-field-overwritten
|-- x86_64-randconfig-a006-20200825
| `-- arch-x86-events-intel-uncore_snb.c:warning:initialized-field-overwritten
|-- x86_64-randconfig-a013-20200824
| |-- arch-x86-mm-numa.c:warning:no-previous-prototype-for-phys_to_target_node
| `-- drivers-nvdimm-e820.c:error:implicit-declaration-of-function-phys_to_target_node
|-- x86_64-randconfig-c002-20200825
| `-- arch-x86-events-intel-uncore_snb.c:warning:initialized-field-overwritten
|-- x86_64-randconfig-m001-20200825
| |-- arch-x86-events-intel-uncore_snb.c:warning:initialized-field-overwritten
| |-- drivers-scsi-ufs-ufshcd.c-ufshcd_probe_hba()-error:double-unlocked-hba-host-host_lock-(orig-line-)
| |-- drivers-scsi-ufs-ufshcd.c-ufshcd_reset_and_restore()-error:double-unlocked-hba-host-host_lock-(orig-line-)
| |-- fs-notify-fsnotify.c-fsnotify()-warn:variable-dereferenced-before-check-inode-(see-line-)
| `-- fs-xfs-libxfs-xfs_bmap.c-xfs_bmap_collapse_extents()-warn:Function-too-hairy.-No-more-merges.
|-- x86_64-randconfig-s021-20200825
| `-- arch-x86-events-intel-uncore_snb.c:warning:initialized-field-overwritten
|-- x86_64-randconfig-s022-20200825
| |-- arch-x86-events-intel-uncore_snb.c:warning:initialized-field-overwritten
| |-- ld:net-core-fib_rules.c:undefined-reference-to-fib6_rule_action
| |-- ld:net-core-fib_rules.c:undefined-reference-to-fib6_rule_match
| |-- ld:net-core-fib_rules.c:undefined-reference-to-fib6_rule_suppress
| |-- net-core-fib_rules.c:undefined-reference-to-fib6_rule_action
| `-- net-core-fib_rules.c:undefined-reference-to-fib6_rule_match
|-- x86_64-rhel
| `-- arch-x86-events-intel-uncore_snb.c:warning:initialized-field-overwritten
|-- x86_64-rhel-7.6-kselftests
| `-- arch-x86-events-intel-uncore_snb.c:warning:initialized-field-overwritten
|-- x86_64-rhel-8.3
| |-- arch-x86-events-intel-uncore_snb.c:warning:initialized-field-overwritten
| `-- drivers-dax-device.c:warning:variable-dax_region-set-but-not-used
`-- xtensa-allyesconfig
`-- drivers-staging-hikey9xx-hisi-spmi-controller.c:warning:format-ld-expects-argument-of-type-long-int-but-argument-has-type-size_t-aka-unsigned-int
clang_recent_errors
|-- s390-randconfig-r012-20200825
| `-- sound-soc-sof-intel-hda-codec.c:warning:unused-label-error
`-- x86_64-randconfig-a011-20200825
`-- drivers-nvdimm-e820.c:error:implicit-declaration-of-function-phys_to_target_node-Werror-Wimplicit-function-declaration
elapsed time: 721m
configs tested: 66
configs skipped: 1
arm defconfig
arm64 allyesconfig
arm64 defconfig
arm allyesconfig
arm allmodconfig
ia64 allmodconfig
ia64 defconfig
ia64 allyesconfig
m68k allmodconfig
m68k defconfig
m68k allyesconfig
nds32 defconfig
nios2 allyesconfig
csky defconfig
alpha defconfig
alpha allyesconfig
xtensa allyesconfig
h8300 allyesconfig
arc defconfig
sh allmodconfig
parisc defconfig
s390 allyesconfig
parisc allyesconfig
s390 defconfig
i386 allyesconfig
sparc allyesconfig
sparc defconfig
i386 defconfig
nios2 defconfig
arc allyesconfig
nds32 allnoconfig
c6x allyesconfig
mips allyesconfig
mips allmodconfig
powerpc defconfig
powerpc allyesconfig
powerpc allmodconfig
powerpc allnoconfig
x86_64 randconfig-a003-20200825
x86_64 randconfig-a002-20200825
x86_64 randconfig-a001-20200825
x86_64 randconfig-a005-20200825
x86_64 randconfig-a006-20200825
x86_64 randconfig-a004-20200825
i386 randconfig-a002-20200825
i386 randconfig-a004-20200825
i386 randconfig-a005-20200825
i386 randconfig-a003-20200825
i386 randconfig-a006-20200825
i386 randconfig-a001-20200825
i386 randconfig-a013-20200825
i386 randconfig-a012-20200825
i386 randconfig-a011-20200825
i386 randconfig-a016-20200825
i386 randconfig-a015-20200825
i386 randconfig-a014-20200825
riscv allyesconfig
riscv allnoconfig
riscv defconfig
riscv allmodconfig
x86_64 rhel
x86_64 allyesconfig
x86_64 rhel-7.6-kselftests
x86_64 defconfig
x86_64 kexec
x86_64 rhel-8.3
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [linux-next:master] BUILD REGRESSION 3a00d3dfd4b68b208ecd5405e676d06c8ad6bb63
2020-08-25 21:06 [linux-next:master] BUILD REGRESSION 3a00d3dfd4b68b208ecd5405e676d06c8ad6bb63 kernel test robot
@ 2020-08-25 21:32 ` Andrew Morton
2020-08-26 16:13 ` Joao Martins
0 siblings, 1 reply; 5+ messages in thread
From: Andrew Morton @ 2020-08-25 21:32 UTC (permalink / raw)
To: kernel test robot
Cc: Linux Memory Management List, Joao Martins, Vishal L Verma, Dan Williams
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);
_
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [linux-next:master] BUILD REGRESSION 3a00d3dfd4b68b208ecd5405e676d06c8ad6bb63
2020-08-25 21:32 ` Andrew Morton
@ 2020-08-26 16:13 ` Joao Martins
2020-08-26 18:32 ` Andrew Morton
0 siblings, 1 reply; 5+ messages in thread
From: Joao Martins @ 2020-08-26 16:13 UTC (permalink / raw)
To: Andrew Morton
Cc: kernel test robot, Linux Memory Management List, Vishal L Verma,
Dan Williams
On 8/25/20 10:32 PM, Andrew Morton wrote:
> 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
>
This should have been:
diff --git a/drivers/dax/bus.c b/drivers/dax/bus.c
index 8dd82ea9d53d..06a789aba58a 100644
--- a/drivers/dax/bus.c
+++ b/drivers/dax/bus.c
@@ -607,13 +607,16 @@ static int alloc_dev_dax_range(struct dev_dax *dev_dax, u64 start,
return -ENOMEM;
alloc = __request_region(res, start, size, dev_name(dev), 0);
- if (!alloc && !dev_dax->nr_range) {
+ if (!alloc) {
/*
- * If we adjusted an existing @ranges leave it alone,
- * but if this was an empty set of ranges nothing else
+ * If this was an empty set of ranges nothing else
* will release @ranges, so do it now.
*/
- kfree(ranges);
+ if (!dev_dax->nr_range) {
+ kfree(ranges);
+ ranges = NULL;
+ }
+ dev_dax->ranges = ranges;
return -ENOMEM;
}
To kfree only with nr_range == 0, while also avoiding the leakage of @ranges (from
krealloc success case with nr_ranges > 0) without the null deref that this introduces.
>
>> 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);
> _
>
Yes.
And also the MEMORY_HOTPLUG=n and ACPI=n build issues that Randy/you fixed which are
introduced by this series too. Just to confirm: I should add up all these fixes and respin
the series right? Or should I follow-up the first one on top of what you've already staged
in -mm tree?
Joao
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [linux-next:master] BUILD REGRESSION 3a00d3dfd4b68b208ecd5405e676d06c8ad6bb63
2020-08-26 16:13 ` Joao Martins
@ 2020-08-26 18:32 ` Andrew Morton
2020-08-26 19:45 ` Joao Martins
0 siblings, 1 reply; 5+ messages in thread
From: Andrew Morton @ 2020-08-26 18:32 UTC (permalink / raw)
To: Joao Martins
Cc: kernel test robot, Linux Memory Management List, Vishal L Verma,
Dan Williams
On Wed, 26 Aug 2020 17:13:12 +0100 Joao Martins <joao.m.martins@oracle.com> wrote:
> This should have been:
Thanks.
>
> And also the MEMORY_HOTPLUG=n and ACPI=n build issues that Randy/you fixed which are
> introduced by this series too. Just to confirm: I should add up all these fixes and respin
> the series right? Or should I follow-up the first one on top of what you've already staged
> in -mm tree?
That's OK, I've been scooping up the fixes.
https://ozlabs.org/~akpm/mmots/broken-out/mm-memory_hotplug-introduce-default-phys_to_target_node-implementation-fix.patch
https://ozlabs.org/~akpm/mmots/broken-out/device-dax-make-align-a-per-device-property-fix.patch
and this one,
From: Joao Martins <joao.m.martins@oracle.com>
Subject: device-dax-add-dis-contiguous-resource-support-fix
kfree only with nr_range == 0, while also avoiding the leakage of @ranges
(from krealloc success case with nr_ranges > 0) without the null deref
that this introduces.
Link: https://lkml.kernel.org/r/6d57acf7-63cf-168d-f68e-67d88832f10f@oracle.com
Cc: Dan Williams <dan.j.williams@intel.com>
Cc: Vishal Verma <vishal.l.verma@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
drivers/dax/bus.c | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
--- a/drivers/dax/bus.c~device-dax-add-dis-contiguous-resource-support-fix
+++ a/drivers/dax/bus.c
@@ -607,13 +607,16 @@ static int alloc_dev_dax_range(struct de
return -ENOMEM;
alloc = __request_region(res, start, size, dev_name(dev), 0);
- if (!alloc && !dev_dax->nr_range) {
+ if (!alloc) {
/*
- * If we adjusted an existing @ranges leave it alone,
- * but if this was an empty set of ranges nothing else
+ * If this was an empty set of ranges nothing else
* will release @ranges, so do it now.
*/
- kfree(ranges);
+ if (!dev_dax->nr_range) {
+ kfree(ranges);
+ ranges = NULL;
+ }
+ dev_dax->ranges = ranges;
return -ENOMEM;
}
_
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [linux-next:master] BUILD REGRESSION 3a00d3dfd4b68b208ecd5405e676d06c8ad6bb63
2020-08-26 18:32 ` Andrew Morton
@ 2020-08-26 19:45 ` Joao Martins
0 siblings, 0 replies; 5+ messages in thread
From: Joao Martins @ 2020-08-26 19:45 UTC (permalink / raw)
To: Andrew Morton
Cc: kernel test robot, Linux Memory Management List, Vishal L Verma,
Dan Williams
On 8/26/20 7:32 PM, Andrew Morton wrote:
> On Wed, 26 Aug 2020 17:13:12 +0100 Joao Martins <joao.m.martins@oracle.com> wrote:
>
>> This should have been:
>
> Thanks.
>
>>
>> And also the MEMORY_HOTPLUG=n and ACPI=n build issues that Randy/you fixed which are
>> introduced by this series too. Just to confirm: I should add up all these fixes and respin
>> the series right? Or should I follow-up the first one on top of what you've already staged
>> in -mm tree?
>
> That's OK, I've been scooping up the fixes.
>
> https://ozlabs.org/~akpm/mmots/broken-out/mm-memory_hotplug-introduce-default-phys_to_target_node-implementation-fix.patch
>
> https://ozlabs.org/~akpm/mmots/broken-out/device-dax-make-align-a-per-device-property-fix.patch
>
OK, cool - I saw those. I take from your comment that no action
is needed from my side.
Joao
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2020-08-26 19:46 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-25 21:06 [linux-next:master] BUILD REGRESSION 3a00d3dfd4b68b208ecd5405e676d06c8ad6bb63 kernel test robot
2020-08-25 21:32 ` Andrew Morton
2020-08-26 16:13 ` Joao Martins
2020-08-26 18:32 ` Andrew Morton
2020-08-26 19:45 ` Joao Martins
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).