From: kernel test robot <lkp@intel.com>
To: kbuild@lists.01.org
Subject: arch/arm64/include/asm/current.h:19:9: sparse: sparse: context imbalance in 'RAW_SPINLOCK_in_HARDIRQ' - wrong count at exit
Date: Sat, 07 Aug 2021 09:20:01 +0800 [thread overview]
Message-ID: <202108070951.yPyelE0J-lkp@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 9247 bytes --]
CC: kbuild-all(a)lists.01.org
CC: linux-kernel(a)vger.kernel.org
TO: Boqun Feng <boqun.feng@gmail.com>
CC: Peter Zijlstra <peterz@infradead.org>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: c9194f32bfd932e976a158d1af97a63be68a2aab
commit: 9271a40d2a1429113160ccc4c16150921600bcc1 lockdep/selftest: Add wait context selftests
date: 7 months ago
:::::: branch date: 5 hours ago
:::::: commit date: 7 months ago
config: arm64-randconfig-s032-20210806 (attached as .config)
compiler: aarch64-linux-gcc (GCC) 10.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.3-348-gf0e6938b-dirty
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=9271a40d2a1429113160ccc4c16150921600bcc1
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 9271a40d2a1429113160ccc4c16150921600bcc1
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-10.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=arm64 SHELL=/bin/bash
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 >>)
lib/locking-selftest.c:298:1: sparse: sparse: context imbalance in 'AA_spin' - wrong count at exit
lib/locking-selftest.c:300:1: sparse: sparse: context imbalance in 'AA_wlock' - wrong count at exit
lib/locking-selftest.c:302:1: sparse: sparse: context imbalance in 'AA_rlock' - wrong count at exit
lib/locking-selftest.c:321:13: sparse: sparse: context imbalance in 'rlock_AA1' - wrong count at exit
lib/locking-selftest.c:327:13: sparse: sparse: context imbalance in 'rlock_AA1B' - wrong count at exit
lib/locking-selftest.c:347:13: sparse: sparse: context imbalance in 'rlock_AA2' - wrong count at exit
lib/locking-selftest.c:359:13: sparse: sparse: context imbalance in 'rlock_AA3' - wrong count at exit
lib/locking-selftest.c:722:1: sparse: sparse: context imbalance in 'double_unlock_spin' - unexpected unlock
lib/locking-selftest.c:724:1: sparse: sparse: context imbalance in 'double_unlock_wlock' - unexpected unlock
lib/locking-selftest.c:726:1: sparse: sparse: context imbalance in 'double_unlock_rlock' - unexpected unlock
lib/locking-selftest.c:753:1: sparse: sparse: context imbalance in 'init_held_spin' - wrong count at exit
lib/locking-selftest.c:755:1: sparse: sparse: context imbalance in 'init_held_wlock' - wrong count at exit
lib/locking-selftest.c:757:1: sparse: sparse: context imbalance in 'init_held_rlock' - wrong count at exit
lib/locking-selftest.c: note: in included file (through include/linux/rculist.h, include/linux/pid.h, include/linux/sched.h):
include/linux/rcupdate.h:694:9: sparse: sparse: context imbalance in 'rcu_exit' - unexpected unlock
include/linux/rcupdate.h:729:25: sparse: sparse: context imbalance in 'rcu_bh_exit' - unexpected unlock
include/linux/rcupdate.h:771:25: sparse: sparse: context imbalance in 'rcu_sched_exit' - unexpected unlock
lib/locking-selftest.c:2493:13: sparse: sparse: context imbalance in 'raw_spinlock_exit' - unexpected unlock
lib/locking-selftest.c:2502:13: sparse: sparse: context imbalance in 'spinlock_exit' - unexpected unlock
lib/locking-selftest.c:2573:1: sparse: sparse: context imbalance in 'RCU_in_HARDIRQ' - wrong count at exit
lib/locking-selftest.c:2573:1: sparse: sparse: context imbalance in 'RCU_in_NOTTHREADED_HARDIRQ' - wrong count at exit
lib/locking-selftest.c:2573:1: sparse: sparse: context imbalance in 'RCU_in_SOFTIRQ' - wrong count at exit
lib/locking-selftest.c:2573:1: sparse: sparse: context imbalance in 'RCU_in_RCU' - wrong count at exit
lib/locking-selftest.c:2573:1: sparse: sparse: context imbalance in 'RCU_in_RCU_BH' - wrong count at exit
lib/locking-selftest.c:2573:1: sparse: sparse: context imbalance in 'RCU_in_RCU_CALLBACK' - wrong count at exit
lib/locking-selftest.c:2573:1: sparse: sparse: context imbalance in 'RCU_in_RCU_SCHED' - wrong count at exit
lib/locking-selftest.c:2573:1: sparse: sparse: context imbalance in 'RCU_in_RAW_SPINLOCK' - wrong count at exit
lib/locking-selftest.c:2573:1: sparse: sparse: context imbalance in 'RCU_in_SPINLOCK' - wrong count at exit
lib/locking-selftest.c:2573:1: sparse: sparse: context imbalance in 'RCU_in_MUTEX' - wrong count at exit
lib/locking-selftest.c: note: in included file (through include/linux/thread_info.h, arch/arm64/include/asm/preempt.h, include/linux/preempt.h, ...):
>> arch/arm64/include/asm/current.h:19:9: sparse: sparse: context imbalance in 'RAW_SPINLOCK_in_HARDIRQ' - wrong count at exit
>> arch/arm64/include/asm/current.h:19:9: sparse: sparse: context imbalance in 'RAW_SPINLOCK_in_NOTTHREADED_HARDIRQ' - wrong count at exit
>> arch/arm64/include/asm/current.h:19:9: sparse: sparse: context imbalance in 'RAW_SPINLOCK_in_SOFTIRQ' - wrong count at exit
lib/locking-selftest.c:2574:1: sparse: sparse: context imbalance in 'RAW_SPINLOCK_in_RCU' - wrong count at exit
lib/locking-selftest.c:2574:1: sparse: sparse: context imbalance in 'RAW_SPINLOCK_in_RCU_BH' - wrong count at exit
lib/locking-selftest.c:2574:1: sparse: sparse: context imbalance in 'RAW_SPINLOCK_in_RCU_CALLBACK' - wrong count at exit
lib/locking-selftest.c:2574:1: sparse: sparse: context imbalance in 'RAW_SPINLOCK_in_RCU_SCHED' - wrong count at exit
lib/locking-selftest.c:2574:1: sparse: sparse: context imbalance in 'RAW_SPINLOCK_in_RAW_SPINLOCK' - wrong count at exit
lib/locking-selftest.c:2574:1: sparse: sparse: context imbalance in 'RAW_SPINLOCK_in_SPINLOCK' - wrong count at exit
lib/locking-selftest.c:2574:1: sparse: sparse: context imbalance in 'RAW_SPINLOCK_in_MUTEX' - wrong count at exit
>> arch/arm64/include/asm/current.h:19:9: sparse: sparse: context imbalance in 'SPINLOCK_in_HARDIRQ' - wrong count at exit
>> arch/arm64/include/asm/current.h:19:9: sparse: sparse: context imbalance in 'SPINLOCK_in_NOTTHREADED_HARDIRQ' - wrong count at exit
>> arch/arm64/include/asm/current.h:19:9: sparse: sparse: context imbalance in 'SPINLOCK_in_SOFTIRQ' - wrong count at exit
lib/locking-selftest.c:2575:1: sparse: sparse: context imbalance in 'SPINLOCK_in_RCU' - wrong count at exit
lib/locking-selftest.c:2575:1: sparse: sparse: context imbalance in 'SPINLOCK_in_RCU_BH' - wrong count at exit
lib/locking-selftest.c:2575:1: sparse: sparse: context imbalance in 'SPINLOCK_in_RCU_CALLBACK' - wrong count at exit
lib/locking-selftest.c:2575:1: sparse: sparse: context imbalance in 'SPINLOCK_in_RCU_SCHED' - wrong count at exit
lib/locking-selftest.c:2575:1: sparse: sparse: context imbalance in 'SPINLOCK_in_RAW_SPINLOCK' - wrong count at exit
lib/locking-selftest.c:2575:1: sparse: sparse: context imbalance in 'SPINLOCK_in_SPINLOCK' - wrong count at exit
lib/locking-selftest.c:2575:1: sparse: sparse: context imbalance in 'SPINLOCK_in_MUTEX' - wrong count at exit
lib/locking-selftest.c:2576:1: sparse: sparse: context imbalance in 'MUTEX_in_RCU' - wrong count at exit
lib/locking-selftest.c:2576:1: sparse: sparse: context imbalance in 'MUTEX_in_RCU_BH' - wrong count at exit
lib/locking-selftest.c:2576:1: sparse: sparse: context imbalance in 'MUTEX_in_RCU_SCHED' - wrong count at exit
lib/locking-selftest.c:2576:1: sparse: sparse: context imbalance in 'MUTEX_in_RAW_SPINLOCK' - wrong count at exit
lib/locking-selftest.c:2576:1: sparse: sparse: context imbalance in 'MUTEX_in_SPINLOCK' - wrong count at exit
vim +/RAW_SPINLOCK_in_HARDIRQ +19 arch/arm64/include/asm/current.h
c02433dd6de32f Mark Rutland 2016-11-03 10
9d84fb27fa135c Mark Rutland 2017-01-03 11 /*
9d84fb27fa135c Mark Rutland 2017-01-03 12 * We don't use read_sysreg() as we want the compiler to cache the value where
9d84fb27fa135c Mark Rutland 2017-01-03 13 * possible.
9d84fb27fa135c Mark Rutland 2017-01-03 14 */
c02433dd6de32f Mark Rutland 2016-11-03 15 static __always_inline struct task_struct *get_current(void)
c02433dd6de32f Mark Rutland 2016-11-03 16 {
9d84fb27fa135c Mark Rutland 2017-01-03 17 unsigned long sp_el0;
9d84fb27fa135c Mark Rutland 2017-01-03 18
9d84fb27fa135c Mark Rutland 2017-01-03 @19 asm ("mrs %0, sp_el0" : "=r" (sp_el0));
9d84fb27fa135c Mark Rutland 2017-01-03 20
9d84fb27fa135c Mark Rutland 2017-01-03 21 return (struct task_struct *)sp_el0;
c02433dd6de32f Mark Rutland 2016-11-03 22 }
c02433dd6de32f Mark Rutland 2016-11-03 23
:::::: The code at line 19 was first introduced by commit
:::::: 9d84fb27fa135c99c9fe3de33628774a336a70a8 arm64: restore get_current() optimisation
:::::: TO: Mark Rutland <mark.rutland@arm.com>
:::::: CC: Catalin Marinas <catalin.marinas@arm.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 41452 bytes --]
next reply other threads:[~2021-08-07 1:20 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-07 1:20 kernel test robot [this message]
-- strict thread matches above, loose matches on Subject: below --
2021-06-15 15:57 arch/arm64/include/asm/current.h:19:9: sparse: sparse: context imbalance in 'RAW_SPINLOCK_in_HARDIRQ' - wrong count at exit kernel test robot
2021-05-14 16:23 kernel test robot
2021-02-27 20:41 kernel test robot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202108070951.yPyelE0J-lkp@intel.com \
--to=lkp@intel.com \
--cc=kbuild@lists.01.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.