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: <20160614123253.GH30921@twins.programming.kicks-ass.net>
Date:	Tue, 14 Jun 2016 14:32:53 +0200
From:	Peter Zijlstra <peterz@...radead.org>
To:	Juri Lelli <juri.lelli@....com>
Cc:	mingo@...nel.org, tglx@...utronix.de, rostedt@...dmis.org,
	xlpang@...hat.com, linux-kernel@...r.kernel.org,
	mathieu.desnoyers@...icios.com, jdesfossez@...icios.com,
	bristot@...hat.com
Subject: Re: [RFC][PATCH 5/8] rtmutex: Clean up

On Tue, Jun 14, 2016 at 01:08:13PM +0100, Juri Lelli wrote:
> > +	postunlock = rt_mutex_futex_unlock(&pi_state->pi_mutex, &wake_q);
> >  
> >  	/*
> >  	 * First unlock HB so the waiter does not spin on it once he got woken
> > +	 * up. Then wakeup the waiter by calling rt_mutex_postunlock(). Priority
> > +	 * is already adjusted and preemption is disabled to avoid inversion.
> >  	 */
> >  	spin_unlock(&hb->lock);
> >  
> > +	if (postunlock)
> > +		rt_mutex_postunlock(&wake_q);
> 
> I'm most probably missing something, but don't we still need to call
> wake_up_q() even when postunlock is false? IIUC, we were always doing
> that, rt_mutex_postunlock(), before this change (only calling
> preempt_enable() was conditional).

Note that rt_mutex_slowunlock() only uses wake_q on the true path. When
it returns false, it will not have placed a task to wake up.


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ