From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22099 invoked by alias); 4 Apr 2014 22:31:58 -0000 Mailing-List: contact glibc-bugs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: glibc-bugs-owner@sourceware.org Received: (qmail 22038 invoked by uid 48); 4 Apr 2014 22:31:54 -0000 From: "andi-bz at firstfloor dot org" To: glibc-bugs@sourceware.org Subject: [Bug nptl/16657] Lock elision breaks pthread_mutex_detroy Date: Fri, 04 Apr 2014 22:31:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: glibc X-Bugzilla-Component: nptl X-Bugzilla-Version: 2.18 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: andi-bz at firstfloor dot org X-Bugzilla-Status: NEW X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2014-04/txt/msg00037.txt.bz2 https://sourceware.org/bugzilla/show_bug.cgi?id=16657 --- Comment #10 from Andi Kleen --- The reason I originally used DO_ELISION was that I was worried about two parallel trylocks coming in here, and also corrupting the lock state. But yes that fix may have been worse than the original problem, especially since once the elision flag is set we don't care anymore. So likely Andreas' original fix is the right one. Use FORCE_ELISION always. Returning 0 in mutex_destroy would also work, but it could leave the mutex in some awkward immediate state. -- You are receiving this mail because: You are on the CC list for the bug.