linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: kbuild test robot <fengguang.wu@intel.com>
To: Peter Zijlstra <peterz@infradead.org>
Cc: kbuild-all@01.org, linux-kernel@vger.kernel.org,
	Thomas Gleixner <tglx@linutronix.de>
Subject: include/linux/spinlock_api_smp.h:167:27: sparse: context imbalance in 'wake_futex_pi' - unexpected unlock
Date: Tue, 9 May 2017 18:55:14 +0800	[thread overview]
Message-ID: <201705091805.ktbl338K%fengguang.wu@intel.com> (raw)

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   2868b2513aa732a99ea4a0a6bf10dc93c1f3dac2
commit: bebe5b514345f09be2c15e414d076b02ecb9cce8 futex: Futex_unlock_pi() determinism
date:   7 weeks ago
reproduce:
        # apt-get install sparse
        git checkout bebe5b514345f09be2c15e414d076b02ecb9cce8
        make ARCH=x86_64 allmodconfig
        make C=1 CF=-D__CHECK_ENDIAN__


sparse warnings: (new ones prefixed by >>)

   arch/x86/include/asm/futex.h:113:16: sparse: incorrect type in initializer (different address spaces)
   arch/x86/include/asm/futex.h:113:16:    expected unsigned int [noderef] [usertype] <asn:1>*__uval
   arch/x86/include/asm/futex.h:113:16:    got unsigned int [usertype] *uval
   arch/x86/include/asm/futex.h:113:16: sparse: dereference of noderef expression
>> include/linux/spinlock_api_smp.h:167:27: sparse: context imbalance in 'wake_futex_pi' - unexpected unlock
   kernel/futex.c:1577:33: sparse: context imbalance in 'futex_wake_op' - different lock contexts for basic block
   kernel/futex.c:1859:41: sparse: context imbalance in 'futex_requeue' - different lock contexts for basic block
   include/linux/spinlock_api_smp.h:169:9: sparse: context imbalance in 'fixup_pi_state_owner' - unexpected unlock
   kernel/futex.c:2377:13: sparse: context imbalance in 'futex_wait_queue_me' - unexpected unlock
   kernel/futex.c:2480:9: sparse: context imbalance in 'futex_wait_setup' - different lock contexts for basic block
   kernel/futex.c:2748:12: sparse: context imbalance in 'futex_unlock_pi' - different lock contexts for basic block
   kernel/futex.c:3013:29: sparse: context imbalance in 'futex_wait_requeue_pi' - unexpected unlock

vim +/wake_futex_pi +167 include/linux/spinlock_api_smp.h

9828ea9d Thomas Gleixner 2009-12-03  151  	do_raw_spin_unlock(lock);
69d0ee73 Heiko Carstens  2009-08-31  152  	preempt_enable();
69d0ee73 Heiko Carstens  2009-08-31  153  }
69d0ee73 Heiko Carstens  2009-08-31  154  
9c1721aa Thomas Gleixner 2009-12-03  155  static inline void __raw_spin_unlock_irqrestore(raw_spinlock_t *lock,
69d0ee73 Heiko Carstens  2009-08-31  156  					    unsigned long flags)
69d0ee73 Heiko Carstens  2009-08-31  157  {
69d0ee73 Heiko Carstens  2009-08-31  158  	spin_release(&lock->dep_map, 1, _RET_IP_);
9828ea9d Thomas Gleixner 2009-12-03  159  	do_raw_spin_unlock(lock);
69d0ee73 Heiko Carstens  2009-08-31  160  	local_irq_restore(flags);
69d0ee73 Heiko Carstens  2009-08-31  161  	preempt_enable();
69d0ee73 Heiko Carstens  2009-08-31  162  }
69d0ee73 Heiko Carstens  2009-08-31  163  
9c1721aa Thomas Gleixner 2009-12-03  164  static inline void __raw_spin_unlock_irq(raw_spinlock_t *lock)
69d0ee73 Heiko Carstens  2009-08-31  165  {
69d0ee73 Heiko Carstens  2009-08-31  166  	spin_release(&lock->dep_map, 1, _RET_IP_);
9828ea9d Thomas Gleixner 2009-12-03 @167  	do_raw_spin_unlock(lock);
69d0ee73 Heiko Carstens  2009-08-31  168  	local_irq_enable();
69d0ee73 Heiko Carstens  2009-08-31  169  	preempt_enable();
69d0ee73 Heiko Carstens  2009-08-31  170  }
69d0ee73 Heiko Carstens  2009-08-31  171  
9c1721aa Thomas Gleixner 2009-12-03  172  static inline void __raw_spin_unlock_bh(raw_spinlock_t *lock)
69d0ee73 Heiko Carstens  2009-08-31  173  {
69d0ee73 Heiko Carstens  2009-08-31  174  	spin_release(&lock->dep_map, 1, _RET_IP_);
9828ea9d Thomas Gleixner 2009-12-03  175  	do_raw_spin_unlock(lock);

:::::: The code at line 167 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 kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

                 reply	other threads:[~2017-05-09 10:56 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=201705091805.ktbl338K%fengguang.wu@intel.com \
    --to=fengguang.wu@intel.com \
    --cc=kbuild-all@01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=peterz@infradead.org \
    --cc=tglx@linutronix.de \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).