Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752847AbbLHVcI (ORCPT ); Tue, 8 Dec 2015 16:32:08 -0500 Received: from www.linutronix.de ([62.245.132.108]:52431 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751222AbbLHVcG (ORCPT ); Tue, 8 Dec 2015 16:32:06 -0500 Date: Tue, 8 Dec 2015 22:31:14 +0100 (CET) From: Thomas Gleixner To: Joe Lawrence cc: Jiang Liu , linux-kernel@vger.kernel.org, x86@kernel.org Subject: Re: [Bugfix 4/5] x86/irq: Fix a race condition between vector assigning and cleanup In-Reply-To: <56662487.40200@stratus.com> Message-ID: References: <1448870970-1461-1-git-send-email-jiang.liu@linux.intel.com> <1448870970-1461-4-git-send-email-jiang.liu@linux.intel.com> <565E234B.6030808@stratus.com> <56662487.40200@stratus.com> User-Agent: Alpine 2.11 (DEB 23 2013-08-11) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001,URIBL_BLOCKED=0.001 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1764 Lines: 46 On Mon, 7 Dec 2015, Joe Lawrence wrote: > On 12/01/2015 05:46 PM, Joe Lawrence wrote: > > On 11/30/2015 03:09 AM, Jiang Liu wrote: > > > Joe Lawrence reported an use after release > > > issue related to x86 IRQ management code. Please refer to following > > > link for more information: > > > https://www.mail-archive.com/linux-kernel@vger.kernel.org/msg1026840.html > > > > > > Thomas pointed out that it's caused by a race condition between > > > __assign_irq_vector() and __send_cleanup_vector(). Based on Thomas' > > > draft patch, we solve this race condition by: > > > 1) Use move_in_progress to signal that an IRQ cleanup IPI is needed > > > 2) Use old_domain to save old CPU mask for IRQ cleanup > > > 3) Use vector to protect move_in_progress and old_domain > > > > > > This bugfix patch also helps to get rid of that atomic allocation in > > > __send_cleanup_vector(). > > > > > > Signed-off-by: Jiang Liu > > > --- > > > > [ ... snip ... ] > > > > Jiang, Thomas, > > > > Last night I ran with Jiang's five-patch-set on top of 4.3. Tests > > started with regular sysfs device removal of mpt HBAs, then later I > > added disk stress (the disks are software RAID1 across the HBAs) .. no > > issues. > > > > I'll kick off some tougher surprise device removal tests tonight to > > further kick the tires. > > Testing looked good. Feel to add a Tested-by and/or Reported-by. Ok. Great. I'll pick that lot up and tag it for stable. Thanks, tglx -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/