[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <202302020153.4eL3mwiK-lkp@intel.com>
Date: Thu, 2 Feb 2023 01:31:42 +0800
From: kernel test robot <lkp@...el.com>
To: Logan Gunthorpe <logang@...tatee.com>
Cc: oe-kbuild-all@...ts.linux.dev, linux-kernel@...r.kernel.org,
Jens Axboe <axboe@...nel.dk>, Christoph Hellwig <hch@....de>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Chaitanya Kulkarni <kch@...dia.com>
Subject: drivers/pci/p2pdma.c:199:44: sparse: sparse: dereference of noderef
expression
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: c0b67534c95c537f7a506a06b98e5e85d72e2b7d
commit: 7e9c7ef83d785236f5a8c3761dd053fae9b92fb8 PCI/P2PDMA: Allow userspace VMA allocations through sysfs
date: 3 months ago
config: arm64-randconfig-s042-20230201 (https://download.01.org/0day-ci/archive/20230202/202302020153.4eL3mwiK-lkp@intel.com/config)
compiler: aarch64-linux-gcc (GCC) 12.1.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# apt-get install sparse
# sparse version: v0.6.4-39-gce1a6720-dirty
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=7e9c7ef83d785236f5a8c3761dd053fae9b92fb8
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 7e9c7ef83d785236f5a8c3761dd053fae9b92fb8
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=arm64 olddefconfig
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=arm64 SHELL=/bin/bash drivers/pci/
If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@...el.com>
sparse warnings: (new ones prefixed by >>)
>> drivers/pci/p2pdma.c:199:44: sparse: sparse: dereference of noderef expression
vim +199 drivers/pci/p2pdma.c
193
194 static void p2pdma_page_free(struct page *page)
195 {
196 struct pci_p2pdma_pagemap *pgmap = to_p2p_pgmap(page->pgmap);
197 struct percpu_ref *ref;
198
> 199 gen_pool_free_owner(pgmap->provider->p2pdma->pool,
200 (uintptr_t)page_to_virt(page), PAGE_SIZE,
201 (void **)&ref);
202 percpu_ref_put(ref);
203 }
204
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests
Powered by blists - more mailing lists