From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933531AbcJHRIq (ORCPT ); Sat, 8 Oct 2016 13:08:46 -0400 Received: from Galois.linutronix.de ([146.0.238.70]:46571 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751493AbcJHRIj (ORCPT ); Sat, 8 Oct 2016 13:08:39 -0400 Date: Sat, 8 Oct 2016 19:06:04 +0200 (CEST) From: Thomas Gleixner To: Peter Zijlstra cc: mingo@kernel.org, juri.lelli@arm.com, rostedt@goodmis.org, xlpang@redhat.com, bigeasy@linutronix.de, linux-kernel@vger.kernel.org, mathieu.desnoyers@efficios.com, jdesfossez@efficios.com, bristot@redhat.com Subject: Re: [RFC][PATCH 4/4] futex: Rewrite FUTEX_UNLOCK_PI In-Reply-To: <20161008165540.GI3568@worktop.programming.kicks-ass.net> Message-ID: References: <20161003091234.879763059@infradead.org> <20161003091847.704255067@infradead.org> <20161007112143.GJ3117@twins.programming.kicks-ass.net> <20161008165540.GI3568@worktop.programming.kicks-ass.net> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, 8 Oct 2016, Peter Zijlstra wrote: > > So in this case we tell the caller on CPU 1 that the futex is in > > inconsistent state, because pistate->owner still points to the unlocking > > task while the user space value alread shows the new owner. So this sanity > > check triggers and we simply fail while we should not. It's [10] in the > > state matrix above attach_to_pi_state(). > > Urgh, yes. I think I can cure that, by taking > pi_state->pi_mutex.wait_lock in attach_to_pi_state(), but blergh. > > > I suspect that there are more issues like this, especially since I did not > > look at requeue_pi yet, but by now my brain is completely fried. > > Yes, I know about fried brains :-( This stuff has far too many moving > parts. I've been staring at this stuff far too long. > > Also, we need better tools to stress this stuff. I tried to come up with something which forces all corner cases of this years ago and failed. The state space seems to be infinite. Thanks, tglx