include/linux/rwlock_api_smp.h:226:9: sparse: sparse: context imbalance in 'prb_clear_blk_fill_status' - unexpected unlock

From: kernel test robot
Date: Tue Aug 11 2020 - 05:23:48 EST


tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 00e4db51259a5f936fec1424b884f029479d3981
commit: 632ca50f2cbd8809a2fc1934b4b2c9c49bd55e98 af_packet: TPACKET_V3: replace busy-wait loop
date: 4 weeks ago
config: arm64-randconfig-s032-20200811 (attached as .config)
compiler: aarch64-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-168-g9554805c-dirty
git checkout 632ca50f2cbd8809a2fc1934b4b2c9c49bd55e98
# 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=arm64

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


sparse warnings: (new ones prefixed by >>)

net/packet/af_packet.c: note: in included file (through include/linux/spinlock_api_smp.h, include/linux/spinlock.h, include/linux/mmzone.h, ...):
>> include/linux/rwlock_api_smp.h:226:9: sparse: sparse: context imbalance in 'prb_clear_blk_fill_status' - unexpected unlock
net/packet/af_packet.c:1001:9: sparse: sparse: context imbalance in 'prb_fill_curr_block' - wrong count at exit
net/packet/af_packet.c: note: in included file (through arch/arm64/include/asm/smp.h, include/linux/smp.h, arch/arm64/include/asm/arch_timer.h, ...):
arch/arm64/include/asm/percpu.h:112:1: sparse: sparse: cast truncates bits from constant value (ffffffff becomes ff)
arch/arm64/include/asm/percpu.h:112:1: sparse: sparse: cast truncates bits from constant value (ffffffff becomes ffff)

vim +/prb_clear_blk_fill_status +226 include/linux/rwlock_api_smp.h

6b6b4792f89346 Thomas Gleixner 2009-11-16 222
9c1721aa4994f6 Thomas Gleixner 2009-12-03 223 static inline void __raw_read_unlock(rwlock_t *lock)
6b6b4792f89346 Thomas Gleixner 2009-11-16 224 {
5facae4f3549b5 Qian Cai 2019-09-19 225 rwlock_release(&lock->dep_map, _RET_IP_);
9828ea9d75c38f Thomas Gleixner 2009-12-03 @226 do_raw_read_unlock(lock);
6b6b4792f89346 Thomas Gleixner 2009-11-16 227 preempt_enable();
6b6b4792f89346 Thomas Gleixner 2009-11-16 228 }
6b6b4792f89346 Thomas Gleixner 2009-11-16 229

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

:::::: 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