From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752783Ab1IBOua (ORCPT ); Fri, 2 Sep 2011 10:50:30 -0400 Received: from casper.infradead.org ([85.118.1.10]:60378 "EHLO casper.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752349Ab1IBOu2 convert rfc822-to-8bit (ORCPT ); Fri, 2 Sep 2011 10:50:28 -0400 Subject: Re: [PATCH 11/13] x86/ticketlock: only do kick after doing unlock From: Peter Zijlstra To: Jeremy Fitzhardinge Cc: "H. Peter Anvin" , Linus Torvalds , Ingo Molnar , the arch/x86 maintainers , Linux Kernel Mailing List , Nick Piggin , Avi Kivity , Marcelo Tosatti , KVM , Andi Kleen , Xen Devel , Srivatsa Vaddagiri , Jeremy Fitzhardinge Date: Fri, 02 Sep 2011 16:49:28 +0200 In-Reply-To: <8cd2c77886e2d3fcad8258aa62509b3b2fae5545.1314922370.git.jeremy.fitzhardinge@citrix.com> References: <8cd2c77886e2d3fcad8258aa62509b3b2fae5545.1314922370.git.jeremy.fitzhardinge@citrix.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT X-Mailer: Evolution 3.0.2- Message-ID: <1314974968.1861.3.camel@twins> Mime-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 2011-09-01 at 17:55 -0700, Jeremy Fitzhardinge wrote: > From: Srivatsa Vaddagiri > > We must release the lock before checking to see if the lock is in > slowpath or else there's a potential race where the lock enters the > slow path after the unlocker has checked the slowpath flag, but before > it has actually unlocked. > > Signed-off-by: Srivatsa Vaddagiri > Signed-off-by: Jeremy Fitzhardinge Wouldn't it be much better to fold it back so that this bug never happens when you bisect?