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>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <201608110315.QOB75xfV%fengguang.wu@intel.com>
Date:	Thu, 11 Aug 2016 04:00:02 +0800
From:	kbuild test robot <lkp@...el.com>
To:	Jason Low <jason.low2@....com>
Cc:	kbuild-all@...org, Peter Zijlstra <peterz@...radead.org>,
	Ingo Molnar <mingo@...hat.com>, imre.deak@...el.com,
	linux-kernel@...r.kernel.org, Jason Low <jason.low2@...com>,
	Jason Low <jason.low2@....com>,
	Waiman Long <Waiman.Long@....com>,
	Davidlohr Bueso <dave@...olabs.net>,
	Tim Chen <tim.c.chen@...ux.intel.com>, terry.rudd@....com,
	"Paul E. McKenney" <paulmck@...ibm.com>
Subject: Re: [PATCH v2] locking/mutex: Prevent lock starvation when spinning
 is enabled

Hi Jason,

[auto build test WARNING on tip/locking/core]
[also build test WARNING on v4.8-rc1 next-20160809]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Jason-Low/locking-mutex-Prevent-lock-starvation-when-spinning-is-enabled/20160811-034327
config: m68k-allyesconfig (attached as .config)
compiler: m68k-linux-gcc (GCC) 4.9.0
reproduce:
        wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        make.cross ARCH=m68k 

All warnings (new ones prefixed by >>):

   kernel/locking/mutex.c: In function 'do_yield_to_waiter':
   kernel/locking/mutex.c:441:10: error: 'struct mutex' has no member named 'yield_to_waiter'
     if (lock->yield_to_waiter != true)
             ^
   kernel/locking/mutex.c:442:7: error: 'struct mutex' has no member named 'yield_to_waiter'
      lock->yield_to_waiter = true;
          ^
   kernel/locking/mutex.c: In function 'clear_yield_to_waiter':
   kernel/locking/mutex.c:447:6: error: 'struct mutex' has no member named 'yield_to_waiter'
     lock->yield_to_waiter = false;
         ^
   kernel/locking/mutex.c: In function 'need_yield_to_waiter':
   kernel/locking/mutex.c:452:13: error: 'struct mutex' has no member named 'yield_to_waiter'
     return lock->yield_to_waiter;
                ^
   kernel/locking/mutex.c: In function '__ww_mutex_lock':
>> kernel/locking/mutex.c:983:7: warning: passing argument 1 of 'need_yield_to_waiter' from incompatible pointer type
     if (!need_yield_to_waiter(lock))
          ^
   kernel/locking/mutex.c:450:20: note: expected 'struct mutex *' but argument is of type 'struct ww_mutex *'
    static inline bool need_yield_to_waiter(struct mutex *lock)
                       ^
   kernel/locking/mutex.c: In function '__ww_mutex_lock_interruptible':
   kernel/locking/mutex.c:1002:7: warning: passing argument 1 of 'need_yield_to_waiter' from incompatible pointer type
     if (!need_yield_to_waiter(lock))
          ^
   kernel/locking/mutex.c:450:20: note: expected 'struct mutex *' but argument is of type 'struct ww_mutex *'
    static inline bool need_yield_to_waiter(struct mutex *lock)
                       ^
   kernel/locking/mutex.c: In function 'need_yield_to_waiter':
   kernel/locking/mutex.c:453:1: warning: control reaches end of non-void function [-Wreturn-type]
    }
    ^

vim +/need_yield_to_waiter +983 kernel/locking/mutex.c

   967		ret = __mutex_fastpath_trylock(&lock->count, __mutex_trylock_slowpath);
   968		if (ret)
   969			mutex_set_owner(lock);
   970	
   971		return ret;
   972	}
   973	EXPORT_SYMBOL(mutex_trylock);
   974	
   975	#ifndef CONFIG_DEBUG_LOCK_ALLOC
   976	int __sched
   977	__ww_mutex_lock(struct ww_mutex *lock, struct ww_acquire_ctx *ctx)
   978	{
   979		int ret = 1;
   980	
   981		might_sleep();
   982	
 > 983		if (!need_yield_to_waiter(lock))
   984			ret = __mutex_fastpath_lock_retval(&lock->base.count);
   985	
   986		if (likely(!ret)) {
   987			ww_mutex_set_context_fastpath(lock, ctx);
   988			mutex_set_owner(&lock->base);
   989		} else
   990			ret = __ww_mutex_lock_slowpath(lock, ctx);
   991		return ret;

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

Download attachment ".config.gz" of type "application/octet-stream" (37707 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ