From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755622AbdEIQGA (ORCPT ); Tue, 9 May 2017 12:06:00 -0400 Received: from mga09.intel.com ([134.134.136.24]:6071 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754613AbdEIQF5 (ORCPT ); Tue, 9 May 2017 12:05:57 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.38,315,1491289200"; d="scan'208";a="1145645424" Date: Wed, 10 May 2017 00:04:51 +0800 From: kbuild test robot To: Peter Zijlstra Cc: kbuild-all@01.org, linux-kernel@vger.kernel.org, Thomas Gleixner Subject: arch/x86/include/asm/qspinlock.h:17:9: sparse: context imbalance in 'wake_futex_pi' - unexpected unlock Message-ID: <201705100047.ZD3lODn2%fengguang.wu@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.23 (2014-03-12) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: fengguang.wu@intel.com X-SA-Exim-Scanned: No (on bee); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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] *__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 >> arch/x86/include/asm/qspinlock.h:17:9: 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 +17 arch/x86/include/asm/qspinlock.h d73a3397 Waiman Long 2015-04-24 1 #ifndef _ASM_X86_QSPINLOCK_H d73a3397 Waiman Long 2015-04-24 2 #define _ASM_X86_QSPINLOCK_H d73a3397 Waiman Long 2015-04-24 3 2aa79af6 Peter Zijlstra (Intel 2015-04-24 4) #include d73a3397 Waiman Long 2015-04-24 5 #include f233f7f1 Peter Zijlstra (Intel 2015-04-24 6) #include d73a3397 Waiman Long 2015-04-24 7 d73a3397 Waiman Long 2015-04-24 8 #define queued_spin_unlock queued_spin_unlock d73a3397 Waiman Long 2015-04-24 9 /** d73a3397 Waiman Long 2015-04-24 10 * queued_spin_unlock - release a queued spinlock d73a3397 Waiman Long 2015-04-24 11 * @lock : Pointer to queued spinlock structure d73a3397 Waiman Long 2015-04-24 12 * d73a3397 Waiman Long 2015-04-24 13 * A smp_store_release() on the least-significant byte. d73a3397 Waiman Long 2015-04-24 14 */ f233f7f1 Peter Zijlstra (Intel 2015-04-24 15) static inline void native_queued_spin_unlock(struct qspinlock *lock) d73a3397 Waiman Long 2015-04-24 16 { d73a3397 Waiman Long 2015-04-24 @17 smp_store_release((u8 *)lock, 0); d73a3397 Waiman Long 2015-04-24 18 } d73a3397 Waiman Long 2015-04-24 19 f233f7f1 Peter Zijlstra (Intel 2015-04-24 20) #ifdef CONFIG_PARAVIRT_SPINLOCKS f233f7f1 Peter Zijlstra (Intel 2015-04-24 21) extern void native_queued_spin_lock_slowpath(struct qspinlock *lock, u32 val); f233f7f1 Peter Zijlstra (Intel 2015-04-24 22) extern void __pv_init_lock_hash(void); f233f7f1 Peter Zijlstra (Intel 2015-04-24 23) extern void __pv_queued_spin_lock_slowpath(struct qspinlock *lock, u32 val); f233f7f1 Peter Zijlstra (Intel 2015-04-24 24) extern void __raw_callee_save___pv_queued_spin_unlock(struct qspinlock *lock); f233f7f1 Peter Zijlstra (Intel 2015-04-24 25) :::::: The code at line 17 was first introduced by commit :::::: d73a33973f16ab6703e75ea00edee857afa3406e locking/qspinlock, x86: Enable x86-64 to use queued spinlocks :::::: TO: Waiman Long :::::: CC: Ingo Molnar --- 0-DAY kernel test infrastructure Open Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation