include/linux/spinlock.h:393:9: sparse: sparse: context imbalance in 'ext4_trim_extent' - wrong count at exit

From: kernel test robot
Date: Sun Aug 16 2020 - 22:20:38 EST


tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 9123e3a74ec7b934a4a099e98af6a61c2f80bbf5
commit: ebc00dde8a975a543f5e1a7cdac93fef89fefe58 riscv: Add jump-label implementation
date: 2 weeks ago
config: riscv-randconfig-s031-20200817 (attached as .config)
compiler: riscv32-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-180-g49f7e13a-dirty
git checkout ebc00dde8a975a543f5e1a7cdac93fef89fefe58
# 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=riscv

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


sparse warnings: (new ones prefixed by >>)

fs/ext4/mballoc.c:946:9: sparse: sparse: context imbalance in 'ext4_mb_init_cache' - different lock contexts for basic block
fs/ext4/mballoc.c:1860:5: sparse: sparse: context imbalance in 'ext4_mb_try_best_found' - different lock contexts for basic block
fs/ext4/mballoc.c:1888:5: sparse: sparse: context imbalance in 'ext4_mb_find_by_goal' - different lock contexts for basic block
fs/ext4/mballoc.c:2175:12: sparse: sparse: context imbalance in 'ext4_mb_good_group_nolock' - wrong count at exit
fs/ext4/mballoc.c:2286:49: sparse: sparse: context imbalance in 'ext4_mb_regular_allocator' - different lock contexts for basic block
fs/ext4/mballoc.c:2825:17: sparse: sparse: context imbalance in 'ext4_mb_release' - different lock contexts for basic block
fs/ext4/mballoc.c: note: in included file (through include/linux/wait.h, include/linux/wait_bit.h, include/linux/fs.h, fs/ext4/ext4_jbd2.h):
include/linux/spinlock.h:393:9: sparse: sparse: context imbalance in 'ext4_free_data_in_buddy' - wrong count at exit
fs/ext4/mballoc.c:3158:15: sparse: sparse: context imbalance in 'ext4_mb_mark_diskspace_used' - different lock contexts for basic block
fs/ext4/mballoc.c:3409:13: sparse: sparse: context imbalance in 'ext4_discard_allocated_blocks' - different lock contexts for basic block
fs/ext4/mballoc.c:3691:13: sparse: sparse: context imbalance in 'ext4_mb_put_pa' - different lock contexts for basic block
fs/ext4/mballoc.c:4027:24: sparse: sparse: context imbalance in 'ext4_mb_discard_group_preallocations' - different lock contexts for basic block
fs/ext4/mballoc.c:4177:9: sparse: sparse: context imbalance in 'ext4_discard_preallocations' - different lock contexts for basic block
fs/ext4/mballoc.c:4244:9: sparse: sparse: context imbalance in 'ext4_mb_show_ac' - different lock contexts for basic block
fs/ext4/mballoc.c:4472:9: sparse: sparse: context imbalance in 'ext4_mb_discard_lg_preallocations' - different lock contexts for basic block
fs/ext4/mballoc.c:4244:9: sparse: sparse: context imbalance in 'ext4_mb_new_blocks' - different lock contexts for basic block
fs/ext4/mballoc.c:4979:9: sparse: sparse: context imbalance in 'ext4_free_blocks' - different lock contexts for basic block
fs/ext4/mballoc.c:5279:15: sparse: sparse: context imbalance in 'ext4_group_add_blocks' - different lock contexts for basic block
>> include/linux/spinlock.h:393:9: sparse: sparse: context imbalance in 'ext4_trim_extent' - wrong count at exit
fs/ext4/mballoc.c:5343:1: sparse: sparse: context imbalance in 'ext4_trim_all_free' - different lock contexts for basic block
fs/ext4/mballoc.c:5509:1: sparse: sparse: context imbalance in 'ext4_mballoc_query_range' - different lock contexts for basic block

# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=ebc00dde8a975a543f5e1a7cdac93fef89fefe58
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout ebc00dde8a975a543f5e1a7cdac93fef89fefe58
vim +/ext4_trim_extent +393 include/linux/spinlock.h

c2f21ce2e31286 Thomas Gleixner 2009-12-02 390
3490565b633c70 Denys Vlasenko 2015-07-13 391 static __always_inline void spin_unlock(spinlock_t *lock)
c2f21ce2e31286 Thomas Gleixner 2009-12-02 392 {
c2f21ce2e31286 Thomas Gleixner 2009-12-02 @393 raw_spin_unlock(&lock->rlock);
c2f21ce2e31286 Thomas Gleixner 2009-12-02 394 }
c2f21ce2e31286 Thomas Gleixner 2009-12-02 395

:::::: The code at line 393 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