All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: kbuild@lists.01.org
Subject: arch/um/include/asm/thread_info.h:47:9: sparse: sparse: context imbalance in 'RCU_in_HARDIRQ' - wrong count at exit
Date: Mon, 10 May 2021 22:22:37 +0800	[thread overview]
Message-ID: <202105102227.2lH6jlAI-lkp@intel.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 9602 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:   6efb943b8616ec53a5e444193dccf1af9ad627b5
commit: 9271a40d2a1429113160ccc4c16150921600bcc1 lockdep/selftest: Add wait context selftests
date:   4 months ago
:::::: branch date: 17 hours ago
:::::: commit date: 4 months ago
config: um-randconfig-s031-20210510 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce:
        # apt-get install sparse
        # sparse version: v0.6.3-341-g8af24329-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
        make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' W=1 ARCH=um 

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:2456:13: sparse: sparse: context imbalance in 'rcu_exit' - unexpected unlock
   lib/locking-selftest.c:2465:13: sparse: sparse: context imbalance in 'rcu_bh_exit' - unexpected unlock
   lib/locking-selftest.c:2474:13: 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: note: in included file (through include/linux/thread_info.h, include/asm-generic/preempt.h, arch/um/include/generated/asm/preempt.h, ...):
>> arch/um/include/asm/thread_info.h:47:9: sparse: sparse: context imbalance in 'RCU_in_HARDIRQ' - wrong count at exit
>> arch/um/include/asm/thread_info.h:47:9: sparse: sparse: context imbalance in 'RCU_in_NOTTHREADED_HARDIRQ' - wrong count at exit
>> arch/um/include/asm/thread_info.h:47:9: 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
>> arch/um/include/asm/thread_info.h:47:9: sparse: sparse: context imbalance in 'RAW_SPINLOCK_in_HARDIRQ' - wrong count at exit
>> arch/um/include/asm/thread_info.h:47:9: sparse: sparse: context imbalance in 'RAW_SPINLOCK_in_NOTTHREADED_HARDIRQ' - wrong count at exit
>> arch/um/include/asm/thread_info.h:47: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/um/include/asm/thread_info.h:47:9: sparse: sparse: context imbalance in 'SPINLOCK_in_HARDIRQ' - wrong count at exit
>> arch/um/include/asm/thread_info.h:47:9: sparse: sparse: context imbalance in 'SPINLOCK_in_NOTTHREADED_HARDIRQ' - wrong count at exit
>> arch/um/include/asm/thread_info.h:47: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 +/RCU_in_HARDIRQ +47 arch/um/include/asm/thread_info.h

^1da177e4c3f41 include/asm-um/thread_info.h      Linus Torvalds                 2005-04-16  42  
^1da177e4c3f41 include/asm-um/thread_info.h      Linus Torvalds                 2005-04-16  43  /* how to get the thread information struct from C */
^1da177e4c3f41 include/asm-um/thread_info.h      Linus Torvalds                 2005-04-16  44  static inline struct thread_info *current_thread_info(void)
^1da177e4c3f41 include/asm-um/thread_info.h      Linus Torvalds                 2005-04-16  45  {
^1da177e4c3f41 include/asm-um/thread_info.h      Linus Torvalds                 2005-04-16  46  	struct thread_info *ti;
b3461034d7d464 include/asm-um/thread_info.h      Paolo 'Blaisorblade' Giarrusso 2005-05-28 @47  	unsigned long mask = THREAD_SIZE - 1;
534e3adbd22efa arch/um/include/asm/thread_info.h Richard Weinberger             2011-04-27  48  	void *p;
534e3adbd22efa arch/um/include/asm/thread_info.h Richard Weinberger             2011-04-27  49  
534e3adbd22efa arch/um/include/asm/thread_info.h Richard Weinberger             2011-04-27  50  	asm volatile ("" : "=r" (p) : "0" (&ti));
534e3adbd22efa arch/um/include/asm/thread_info.h Richard Weinberger             2011-04-27  51  	ti = (struct thread_info *) (((unsigned long)p) & ~mask);
^1da177e4c3f41 include/asm-um/thread_info.h      Linus Torvalds                 2005-04-16  52  	return ti;
^1da177e4c3f41 include/asm-um/thread_info.h      Linus Torvalds                 2005-04-16  53  }
^1da177e4c3f41 include/asm-um/thread_info.h      Linus Torvalds                 2005-04-16  54  

:::::: The code at line 47 was first introduced by commit
:::::: b3461034d7d46455060c8476910be22b6b0fc313 [PATCH] uml: stack dump fix

:::::: TO: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
:::::: CC: Linus Torvalds <torvalds@ppc970.osdl.org>

---
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: 11026 bytes --]

                 reply	other threads:[~2021-05-10 14:22 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=202105102227.2lH6jlAI-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.