Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752783AbaAOSCX (ORCPT ); Wed, 15 Jan 2014 13:02:23 -0500 Received: from mail-ie0-f169.google.com ([209.85.223.169]:36754 "EHLO mail-ie0-f169.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752339AbaAOSCT (ORCPT ); Wed, 15 Jan 2014 13:02:19 -0500 Date: Wed, 15 Jan 2014 11:02:15 -0700 From: Bjorn Helgaas To: "Rafael J. Wysocki" Cc: Yinghai Lu , "Rafael J. Wysocki" , Gu Zheng , Guo Chao , "linux-pci@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Mika Westerberg , Myron Stowe , Benjamin Herrenschmidt , linux-scsi@vger.kernel.org, Matthew Garrett , Konrad Rzeszutek Wilk Subject: Re: [PATCH 0/9] PCI: Eliminate race conditions between hotplug and sysfs rescan/remove (Was: Re: [PATCH v2 04/10] PCI: Destroy pci dev only once) Message-ID: <20140115180215.GA31386@google.com> References: <1385429290-25397-1-git-send-email-yinghai@kernel.org> <1992931.Zv6xBcN8V4@vostro.rjw.lan> <20440867.YaQfKrcfsQ@vostro.rjw.lan> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20440867.YaQfKrcfsQ@vostro.rjw.lan> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jan 10, 2014 at 03:20:44PM +0100, Rafael J. Wysocki wrote: > [Cc: adding linux-scsi for the MPT changes, Ben for powerpc, Matthew for > platform/x86 and Konrad for Xen] > > On Friday, December 06, 2013 02:21:50 AM Rafael J. Wysocki wrote: > > [...] > > > > > OK > > > > To be a bit more constructive, as the next step I'd try to use > > pci_remove_rescan_mutex to serialize all PCI hotplug operations (as I said > > above) without making the other changes made by my patch. Does that sound > > reasonable? > > Well, no answer here, so as a followup, a series implementing that idea > follows. > > I *hope* I found all of the places that need to be synchronized vs the bus > rescan and device removal that can be triggered via sysfs, but I might overlook > something. Also in some cases I wasn't quite sure how much stuff to put under > the lock, because said stuff is not exactly straightforward. I applied this series to my pci/locking branch for v3.14. It should appear in -next tomorrow. Note that this touches some areas that are not strictly PCI, so speak up if I'm treading on your toes: arch/powerpc/kernel/eeh_driver.c | 19 ++++++++++++-- drivers/acpi/pci_root.c | 6 ++++ drivers/message/fusion/mptbase.c | 2 - drivers/pci/hotplug/acpiphp.h | 5 +++ drivers/pci/hotplug/acpiphp_core.c | 2 - drivers/pci/hotplug/acpiphp_glue.c | 43 +++++++++++++++++++++++++++++---- drivers/pci/hotplug/cpci_hotplug_pci.c | 14 +++++++++- drivers/pci/hotplug/cpqphp_pci.c | 8 +++++- drivers/pci/hotplug/ibmphp_core.c | 13 ++++++++- drivers/pci/hotplug/pciehp_pci.c | 17 +++++++++---- drivers/pci/hotplug/rpadlpar_core.c | 19 ++++++++++---- drivers/pci/hotplug/rpaphp_core.c | 4 +++ drivers/pci/hotplug/s390_pci_hpc.c | 4 ++- drivers/pci/hotplug/sgi_hotplug.c | 5 +++ drivers/pci/hotplug/shpchp_pci.c | 18 ++++++++++--- drivers/pci/pci-sysfs.c | 19 +++++--------- drivers/pci/probe.c | 18 +++++++++++++ drivers/pci/remove.c | 11 ++++++++ drivers/pci/xen-pcifront.c | 8 ++++++ drivers/pcmcia/cardbus.c | 7 +++++ drivers/platform/x86/asus-wmi.c | 2 + drivers/platform/x86/eeepc-laptop.c | 2 + drivers/scsi/mpt2sas/mpt2sas_base.c | 2 - drivers/scsi/mpt3sas/mpt3sas_base.c | 2 - include/linux/pci.h | 3 ++ -- 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/