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-randconfig-s022-20200719 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-14) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.2-49-g707c5017-dirty
git checkout 340a50fd68cdc5c65e74e25482b39e9429f9b8fa
# save the attached .config to linux build tree
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' 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 >>):
In file included from arch/x86/include/asm/bug.h:92,
from include/linux/bug.h:5,
from include/linux/debug_locks.h:7,
from include/linux/lockdep.h:24,
from include/linux/mutex.h:17,
from include/linux/kernfs.h:12,
from include/linux/sysfs.h:16,
from include/linux/kobject.h:20,
from include/linux/of.h:17,
from include/linux/irqdomain.h:35,
from include/linux/acpi.h:13,
from drivers/pci/pci.c:11:
drivers/pci/pci.c: In function 'pci_reset_hotplug_slot':
> include/linux/lockdep.h:268:64: error: invalid type argument of
'->' (have 'struct rw_semaphore')
268 | #define
lockdep_is_held_type(lock, r) lock_is_held_type(&(lock)->dep_map, (r))
| ^~
include/asm-generic/bug.h:118:25: note: in definition of macro 'WARN_ON'
118 | int __ret_warn_on = !!(condition); \
| ^~~~~~~~~
include/linux/lockdep.h:295:27: note: in expansion of macro
'lockdep_is_held_type'
295 | WARN_ON(debug_locks && !lockdep_is_held_type(l, 0)); \
| ^~~~~~~~~~~~~~~~~~~~
drivers/pci/pci.c:4905:2: note: in expansion of macro
'lockdep_assert_held_write'
4905 | lockdep_assert_held_write(hotplug->pci_slot->reset_lock);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
vim +268 include/linux/lockdep.h
f607c668577481 Peter Zijlstra 2009-07-20 266
f8319483f57f1c Peter Zijlstra 2016-11-30 267 #define
lockdep_is_held(lock) lock_is_held(&(lock)->dep_map)
f8319483f57f1c Peter Zijlstra 2016-11-30 @268 #define lockdep_is_held_type(lock,
r) lock_is_held_type(&(lock)->dep_map, (r))
f607c668577481 Peter Zijlstra 2009-07-20 269
:::::: The code at line 268 was first introduced by commit
:::::: f8319483f57f1ca22370f4150bb990aca7728a67 locking/lockdep: Provide a type check for
lock_is_held
:::::: TO: Peter Zijlstra <peterz(a)infradead.org>
:::::: CC: Dave Chinner <david(a)fromorbit.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org