lkml.org 
[lkml]   [2020]   [Aug]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subjectinclude/linux/rwlock_api_smp.h:219:9: sparse: sparse: context imbalance in 'btrfs_set_lock_blocking_write' - unexpected unlock
tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: da2968ff879b9e74688cdc658f646971991d2c56
commit: fbdc8f0f4891df7b5eb643ec0a509a4ac7dcfc2e parisc: Rework arch_rw locking functions
date: 5 months ago
config: parisc-randconfig-s032-20200820 (attached as .config)
compiler: hppa-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-191-g10164920-dirty
git checkout fbdc8f0f4891df7b5eb643ec0a509a4ac7dcfc2e
# 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=parisc

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>


sparse warnings: (new ones prefixed by >>)

fs/btrfs/locking.c: note: in included file (through arch/parisc/include/uapi/asm/unistd.h, arch/parisc/include/asm/unistd.h, include/uapi/linux/unistd.h, ...):
./arch/parisc/include/generated/uapi/asm/unistd_32.h:382:41: sparse: sparse: no newline at end of file
fs/btrfs/locking.c: note: in included file (through include/linux/spinlock_api_smp.h, include/linux/spinlock.h, include/linux/wait.h, ...):
include/linux/rwlock_api_smp.h:226:9: sparse: sparse: context imbalance in 'btrfs_set_lock_blocking_read' - unexpected unlock
>> include/linux/rwlock_api_smp.h:219:9: sparse: sparse: context imbalance in 'btrfs_set_lock_blocking_write' - unexpected unlock
fs/btrfs/locking.c:247:6: sparse: sparse: context imbalance in 'btrfs_tree_read_lock' - different lock contexts for basic block
fs/btrfs/locking.c:288:5: sparse: sparse: context imbalance in 'btrfs_tree_read_lock_atomic' - different lock contexts for basic block
fs/btrfs/locking.c:310:5: sparse: sparse: context imbalance in 'btrfs_try_tree_read_lock' - different lock contexts for basic block
fs/btrfs/locking.c:335:5: sparse: sparse: context imbalance in 'btrfs_try_tree_write_lock' - different lock contexts for basic block
include/linux/rwlock_api_smp.h:226:9: sparse: sparse: context imbalance in 'btrfs_tree_read_unlock' - unexpected unlock
fs/btrfs/locking.c:412:6: sparse: sparse: context imbalance in 'btrfs_tree_lock' - wrong count at exit
>> include/linux/rwlock_api_smp.h:219:9: sparse: sparse: context imbalance in 'btrfs_tree_unlock' - unexpected unlock

# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=fbdc8f0f4891df7b5eb643ec0a509a4ac7dcfc2e
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout fbdc8f0f4891df7b5eb643ec0a509a4ac7dcfc2e
vim +/btrfs_set_lock_blocking_write +219 include/linux/rwlock_api_smp.h

6b6b4792f89346e Thomas Gleixner 2009-11-16 215
9c1721aa4994f66 Thomas Gleixner 2009-12-03 216 static inline void __raw_write_unlock(rwlock_t *lock)
6b6b4792f89346e Thomas Gleixner 2009-11-16 217 {
5facae4f3549b5c Qian Cai 2019-09-19 218 rwlock_release(&lock->dep_map, _RET_IP_);
9828ea9d75c38fe Thomas Gleixner 2009-12-03 @219 do_raw_write_unlock(lock);
6b6b4792f89346e Thomas Gleixner 2009-11-16 220 preempt_enable();
6b6b4792f89346e Thomas Gleixner 2009-11-16 221 }
6b6b4792f89346e Thomas Gleixner 2009-11-16 222

:::::: The code at line 219 was first introduced by commit
:::::: 9828ea9d75c38fe3dce05d00566eed61c85732e6 locking: Further name space cleanups

:::::: TO: Thomas Gleixner <tglx@linutronix.de>
:::::: CC: Thomas Gleixner <tglx@linutronix.de>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[unhandled content-type:application/gzip]
\
 
 \ /
  Last update: 2020-08-21 04:06    [W:0.061 / U:0.100 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site