Thread (1 message) 1 message, 1 author, 2021-09-19

Re: [RFC PATCH 4/4] PCI/ASPM: Remove unncessary linked list defined within aspm.c

From: kernel test robot <hidden>
Date: 2021-09-19 10:22:32
Also in: oe-kbuild-all

Hi Saheed,

[FYI, it's a private test report for your RFC patch.]
[auto build test WARNING on helgaas-pci/next]
[also build test WARNING on v5.15-rc1 next-20210917]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Saheed-O-Bolarinwa/PCI-ASPM-Remove-struct-pcie_link_state-parent/20210916-175210
base:   https://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci.git next
:::::: branch date: 27 hours ago
:::::: commit date: 27 hours ago
config: riscv-randconfig-c006-20210916 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project c8b3d7d6d6de37af68b2f379d0e37304f78e115f)
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # install riscv cross compiling tool for clang build
        # apt-get install binutils-riscv64-linux-gnu
        # https://github.com/0day-ci/linux/commit/a2a494c1e1531309518be74ed2e406334b716fbe
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Saheed-O-Bolarinwa/PCI-ASPM-Remove-struct-pcie_link_state-parent/20210916-175210
        git checkout a2a494c1e1531309518be74ed2e406334b716fbe
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=riscv clang-analyzer

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <redacted>


clang-analyzer warnings: (new ones prefixed by >>)
quoted
drivers/pci/pcie/aspm.c:963:35: warning: Access to field 'aspm_support' results in a dereference of an undefined pointer value (loaded from variable 'link') [clang-analyzer-core.NullDereference]
                   dev->link_state->aspm_capable = link->aspm_support;
                                                   ^

vim +963 drivers/pci/pcie/aspm.c

7d715a6c1ae578 Shaohua Li          2008-02-25  954
07d92760d2ee54 Kenji Kaneshige     2009-08-19  955  /* Recheck latencies and update aspm_capable for links under the root */
07d92760d2ee54 Kenji Kaneshige     2009-08-19  956  static void pcie_update_aspm_capable(struct pcie_link_state *root)
07d92760d2ee54 Kenji Kaneshige     2009-08-19  957  {
b73623c75c53fb Bolarinwa O. Saheed 2021-09-16  958  	struct pci_dev *dev;
a2a494c1e15313 Bolarinwa O. Saheed 2021-09-16  959  	struct pci_bus *rootbus = root->pdev->bus;
07d92760d2ee54 Kenji Kaneshige     2009-08-19  960  	struct pcie_link_state *link;
d98a968e12577a Bolarinwa O. Saheed 2021-09-16  961  	BUG_ON(root->pdev->bus->parent->self);
a2a494c1e15313 Bolarinwa O. Saheed 2021-09-16  962  	list_for_each_entry(dev, &rootbus->devices, bus_list) {
a2a494c1e15313 Bolarinwa O. Saheed 2021-09-16 @963  		dev->link_state->aspm_capable = link->aspm_support;
07d92760d2ee54 Kenji Kaneshige     2009-08-19  964  	}
a2a494c1e15313 Bolarinwa O. Saheed 2021-09-16  965
a2a494c1e15313 Bolarinwa O. Saheed 2021-09-16  966  	list_for_each_entry(dev, &rootbus->devices, bus_list) {
07d92760d2ee54 Kenji Kaneshige     2009-08-19  967  		struct pci_dev *child;
a2a494c1e15313 Bolarinwa O. Saheed 2021-09-16  968  		struct pci_bus *linkbus = dev->subordinate;
b73623c75c53fb Bolarinwa O. Saheed 2021-09-16  969
07d92760d2ee54 Kenji Kaneshige     2009-08-19  970  		list_for_each_entry(child, &linkbus->devices, bus_list) {
62f87c0e31d646 Yijing Wang         2012-07-24  971  			if ((pci_pcie_type(child) != PCI_EXP_TYPE_ENDPOINT) &&
62f87c0e31d646 Yijing Wang         2012-07-24  972  			    (pci_pcie_type(child) != PCI_EXP_TYPE_LEG_END))
07d92760d2ee54 Kenji Kaneshige     2009-08-19  973  				continue;
07d92760d2ee54 Kenji Kaneshige     2009-08-19  974  			pcie_aspm_check_latency(child);
07d92760d2ee54 Kenji Kaneshige     2009-08-19  975  		}
07d92760d2ee54 Kenji Kaneshige     2009-08-19  976  	}
07d92760d2ee54 Kenji Kaneshige     2009-08-19  977  }
07d92760d2ee54 Kenji Kaneshige     2009-08-19  978

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help