lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:   Tue, 9 May 2017 15:47:56 +0800
From:   kbuild test robot <fengguang.wu@...el.com>
To:     Peter Zijlstra <peterz@...radead.org>
Cc:     kbuild-all@...org, linux-kernel@...r.kernel.org,
        Thomas Gleixner <tglx@...utronix.de>
Subject: include/linux/spinlock_api_smp.h:169:9: sparse: context imbalance in
 'fixup_pi_state_owner' - unexpected unlock

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   bf5f89463f5b3109a72ed13ca62b57e90213387d
commit: 734009e96d1983ad739e5b656e03430b3660c913 futex: Change locking rules
date:   7 weeks ago
reproduce:
        # apt-get install sparse
        git checkout 734009e96d1983ad739e5b656e03430b3660c913
        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/list.h:78:19: sparse: context imbalance in 'wake_futex_pi' - unexpected unlock
   kernel/futex.c:1573:33: sparse: context imbalance in 'futex_wake_op' - different lock contexts for basic block
   kernel/futex.c:1855: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:2392:13: sparse: context imbalance in 'futex_wait_queue_me' - unexpected unlock
   kernel/futex.c:2495:9: sparse: context imbalance in 'futex_wait_setup' - different lock contexts for basic block
   kernel/futex.c:2805:22: sparse: context imbalance in 'futex_unlock_pi' - different lock contexts for basic block
   kernel/futex.c:2965:29: sparse: context imbalance in 'futex_wait_requeue_pi' - unexpected unlock

vim +/fixup_pi_state_owner +169 include/linux/spinlock_api_smp.h

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);
9ea4c380 Peter Zijlstra  2013-11-19  176  	__local_bh_enable_ip(_RET_IP_, SOFTIRQ_LOCK_OFFSET);
69d0ee73 Heiko Carstens  2009-08-31  177  }

:::::: The code at line 169 was first introduced by commit
:::::: 69d0ee7377eef808e34ba5542b554ec97244b871 locking: Move spinlock function bodies to header file

:::::: TO: Heiko Carstens <heiko.carstens@...ibm.com>
:::::: CC: Ingo Molnar <mingo@...e.hu>

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ