tree:
https://github.com/l1k/linux pciehp_deadlock
head: 340a50fd68cdc5c65e74e25482b39e9429f9b8fa
commit: 340a50fd68cdc5c65e74e25482b39e9429f9b8fa [1/1] PCI: pciehp: Fix AB-BA deadlock
between reset_lock and device_lock
config: x86_64-allyesconfig (attached as .config)
compiler: clang version 12.0.0 (
https://github.com/llvm/llvm-project
3504acc33e8b9ddd7de71d75cdc329a14dbf58d9)
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 x86_64 cross compiling tool for clang build
# apt-get install binutils-x86-64-linux-gnu
git checkout 340a50fd68cdc5c65e74e25482b39e9429f9b8fa
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
> drivers/pci/pci.c:4905:2: error: member reference type
'struct rw_semaphore' is not a pointer; did you mean to use '.'?
lockdep_assert_held_write(hotplug->pci_slot->reset_lock);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/lockdep.h:295:27: note: expanded from macro
'lockdep_assert_held_write'
WARN_ON(debug_locks && !lockdep_is_held_type(l, 0)); \
~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/lockdep.h:268:64: note: expanded from macro
'lockdep_is_held_type'
#define lockdep_is_held_type(lock, r) lock_is_held_type(&(lock)->dep_map,
(r))
^
include/asm-generic/bug.h:118:25: note: expanded from macro 'WARN_ON'
int __ret_warn_on = !!(condition); \
^~~~~~~~~
> drivers/pci/pci.c:4905:2: error: cannot take the address of an
rvalue of type 'struct lockdep_map'
lockdep_assert_held_write(hotplug->pci_slot->reset_lock);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/lockdep.h:295:27: note: expanded from macro
'lockdep_assert_held_write'
WARN_ON(debug_locks && !lockdep_is_held_type(l, 0)); \
~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/lockdep.h:268:57: note: expanded from macro
'lockdep_is_held_type'
#define lockdep_is_held_type(lock, r) lock_is_held_type(&(lock)->dep_map,
(r))
^
include/asm-generic/bug.h:118:25: note: expanded from macro 'WARN_ON'
int __ret_warn_on = !!(condition); \
^~~~~~~~~
2 errors generated.
vim +4905 drivers/pci/pci.c
4897
4898 static int pci_reset_hotplug_slot(struct hotplug_slot *hotplug, int probe)
4899 {
4900 int rc = -ENOTTY;
4901
4902 if (!hotplug || !try_module_get(hotplug->owner))
4903 return rc;
4904
4905 lockdep_assert_held_write(hotplug->pci_slot->reset_lock);
4906
4907 if (hotplug->ops->reset_slot)
4908 rc = hotplug->ops->reset_slot(hotplug, probe);
4909
4910 module_put(hotplug->owner);
4911
4912 return rc;
4913 }
4914
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org