include/linux/spinlock.h:408:9: sparse: sparse: context imbalance in 'destroy_id_handler_unlock' - wrong count at exit
From: kernel test robot
Date: Sun Aug 09 2020 - 17:20:23 EST
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 06a81c1c7db9bd5de0bd38cd5acc44bb22b99150
commit: f6a9d47ae6854980fc4b1676f1fe9f9fa45ea4e2 RDMA/cma: Execute rdma_cm destruction from a handler properly
date: 11 days ago
config: openrisc-randconfig-s032-20200810 (attached as .config)
compiler: or1k-linux-gcc (GCC) 9.3.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.2-118-ge1578773-dirty
git checkout f6a9d47ae6854980fc4b1676f1fe9f9fa45ea4e2
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=openrisc
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>
sparse warnings: (new ones prefixed by >>)
drivers/infiniband/core/cma.c: note: in included file (through include/linux/swait.h, include/linux/completion.h):
>> include/linux/spinlock.h:408:9: sparse: sparse: context imbalance in 'destroy_id_handler_unlock' - wrong count at exit
drivers/infiniband/core/cma.c:1876:6: sparse: sparse: context imbalance in 'rdma_destroy_id' - unexpected unlock
drivers/infiniband/core/cma.c:2016:17: sparse: sparse: context imbalance in 'cma_ib_handler' - unexpected unlock
drivers/infiniband/core/cma.c:2207:17: sparse: sparse: context imbalance in 'cma_ib_req_handler' - unexpected unlock
drivers/infiniband/core/cma.c:2331:17: sparse: sparse: context imbalance in 'cma_iw_handler' - unexpected unlock
drivers/infiniband/core/cma.c:2379:17: sparse: sparse: context imbalance in 'iw_conn_req_handler' - unexpected unlock
drivers/infiniband/core/cma.c:2647:17: sparse: sparse: context imbalance in 'cma_work_handler' - unexpected unlock
drivers/infiniband/core/cma.c:2670:17: sparse: sparse: context imbalance in 'cma_ndev_work_handler' - unexpected unlock
drivers/infiniband/core/cma.c:3154:17: sparse: sparse: context imbalance in 'addr_handler' - unexpected unlock
drivers/infiniband/core/cma.c:3808:17: sparse: sparse: context imbalance in 'cma_sidr_rep_handler' - unexpected unlock
drivers/infiniband/core/cma.c:4339:17: sparse: sparse: context imbalance in 'cma_ib_mc_handler' - unexpected unlock
vim +/destroy_id_handler_unlock +408 include/linux/spinlock.h
c2f21ce2e31286 Thomas Gleixner 2009-12-02 405
3490565b633c70 Denys Vlasenko 2015-07-13 406 static __always_inline void spin_unlock_irqrestore(spinlock_t *lock, unsigned long flags)
c2f21ce2e31286 Thomas Gleixner 2009-12-02 407 {
c2f21ce2e31286 Thomas Gleixner 2009-12-02 @408 raw_spin_unlock_irqrestore(&lock->rlock, flags);
c2f21ce2e31286 Thomas Gleixner 2009-12-02 409 }
c2f21ce2e31286 Thomas Gleixner 2009-12-02 410
:::::: The code at line 408 was first introduced by commit
:::::: c2f21ce2e31286a0a32f8da0a7856e9ca1122ef3 locking: Implement new raw_spinlock
:::::: TO: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
:::::: CC: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx
Attachment:
.config.gz
Description: application/gzip