From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932581AbZJEKdy (ORCPT ); Mon, 5 Oct 2009 06:33:54 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S932519AbZJEKdy (ORCPT ); Mon, 5 Oct 2009 06:33:54 -0400 Received: from viefep20-int.chello.at ([62.179.121.40]:45582 "EHLO viefep20-int.chello.at" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932515AbZJEKdx (ORCPT ); Mon, 5 Oct 2009 06:33:53 -0400 X-SourceIP: 213.93.53.227 Subject: Re: futex question From: Peter Zijlstra To: Thomas Gleixner Cc: Anirban Sinha , Ingo Molnar , linux-kernel@vger.kernel.org, Darren Hart , Kaz Kylheku , Anirban Sinha In-Reply-To: References: <20091001092218.GH15345@elte.hu> <4AC68F13.8050601@us.ibm.com> <4AC8CF32.8060108@anirban.org> Content-Type: text/plain Date: Mon, 05 Oct 2009 12:36:14 +0200 Message-Id: <1254738974.26976.24.camel@twins> Mime-Version: 1.0 X-Mailer: Evolution 2.26.1 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, 2009-10-04 at 18:59 +0200, Thomas Gleixner wrote: > > do. It does not feel right. Currently, with or without my change, > > such a thing would indefinitely block other waiters on the same > > futex. > > Right. Which completely defeats the purpose of the robust list. Will > have a look tomorrow. Right, so mm_release() which is meant to destroy the old mm context actually does exit_robust_list(), but the problem is that it does so on the new mm, not the old one that got passed down to mm_release(). The other detail is that exit_robust_list() doesn't clear current->robust_list. The problem with the patch send my Ani is that it clears the robust lists before the point of no return, so on a failing execve() we'd have messed up the state. Making exit_robust_list() deal with an mm that is not the current mm is interesting indeed.