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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.02.1405312235210.4154@ionos.tec.linutronix.de>
Date:	Sat, 31 May 2014 22:35:51 +0200 (CEST)
From:	Thomas Gleixner <tglx@...utronix.de>
To:	Steven Rostedt <rostedt@...dmis.org>
cc:	LKML <linux-kernel@...r.kernel.org>,
	Ingo Molnar <mingo@...nel.org>,
	Peter Zijlstra <peterz@...radead.org>,
	Lai Jiangshan <laijs@...fujitsu.com>,
	Jason Low <jason.low2@...com>
Subject: Re: [patch v2 3/5] rtmutex: Confine deadlock logic to futex

On Sat, 31 May 2014, Steven Rostedt wrote:

> On Sat, 31 May 2014 15:57:50 -0000
> Thomas Gleixner <tglx@...utronix.de> wrote:
> 
> > ===================================================================
> > --- tip.orig/kernel/locking/rtmutex.c
> > +++ tip/kernel/locking/rtmutex.c
> > @@ -904,16 +904,15 @@ rt_mutex_slowunlock(struct rt_mutex *loc
> >   */
> >  static inline int
> >  rt_mutex_fastlock(struct rt_mutex *lock, int state,
> > -		  enum rtmutex_chainwalk detect_deadlock,
> >  		  int (*slowfn)(struct rt_mutex *lock, int state,
> >  				struct hrtimer_sleeper *timeout,
> >  				enum rtmutex_chainwalk detect_deadlock))
> >  {
> > -	if (!detect_deadlock && likely(rt_mutex_cmpxchg(lock, NULL, current))) {
> > +	if (likely(rt_mutex_cmpxchg(lock, NULL, current))) {
> >  		rt_mutex_deadlock_account_lock(lock, current);
> >  		return 0;
> >  	} else
> > -		return slowfn(lock, state, NULL, detect_deadlock);
> > +		return slowfn(lock, state, NULL, RT_MUTEX_MIN_CHAINWALK);
> >  }
> >  
> >  static inline int
> > @@ -924,7 +923,7 @@ rt_mutex_timed_fastlock(struct rt_mutex
> >  				      struct hrtimer_sleeper *timeout,
> >  				      enum rtmutex_chainwalk detect_deadlock))
> >  {
> > -	if (!detect_deadlock && likely(rt_mutex_cmpxchg(lock, NULL, current))) {
> > +	if (detect_deadlock && likely(rt_mutex_cmpxchg(lock, NULL, current))) {
> 
> Did you mean to remove that "!"? Don't we want to call the slowfn all
> the time if detect_deadlock is FULL?

No idea how I fat fingered this one ....
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ