From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christoph Hellwig Subject: Re: [PATCH V2 1/7] PCI: protect restore with device lock to be consistent Date: Wed, 29 Nov 2017 09:36:21 -0800 Message-ID: <20171129173621.GB27742@infradead.org> References: <1511763628-11856-1-git-send-email-okaya@codeaurora.org> <1511763628-11856-2-git-send-email-okaya@codeaurora.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <1511763628-11856-2-git-send-email-okaya@codeaurora.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=m.gmane.org@lists.infradead.org To: Sinan Kaya Cc: linux-pci@vger.kernel.org, timur@codeaurora.org, open list , linux-arm-msm@vger.kernel.org, Bjorn Helgaas , linux-arm-kernel@lists.infradead.org List-Id: linux-arm-msm@vger.kernel.org On Mon, Nov 27, 2017 at 01:20:22AM -0500, Sinan Kaya wrote: > Commit b014e96d1abb ("PCI: Protect pci_error_handlers->reset_notify() usage > with device_lock()") added protection around pci_dev_restore() function so > that device specific remove callback does not cause a race condition > against hotplug. > > pci_dev_lock() usage has been forgotten in two different places in the > code. Adding locks for pci_slot_restore() and moving pci_dev_restore() > inside the locks for pci_try_reset_function(). > > Signed-off-by: Sinan Kaya Looks good, Reviewed-by: Christoph Hellwig From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934640AbdK2RgZ (ORCPT ); Wed, 29 Nov 2017 12:36:25 -0500 Received: from bombadil.infradead.org ([65.50.211.133]:46635 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934293AbdK2RgW (ORCPT ); Wed, 29 Nov 2017 12:36:22 -0500 Date: Wed, 29 Nov 2017 09:36:21 -0800 From: Christoph Hellwig To: Sinan Kaya Cc: linux-pci@vger.kernel.org, timur@codeaurora.org, linux-arm-msm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Bjorn Helgaas , open list Subject: Re: [PATCH V2 1/7] PCI: protect restore with device lock to be consistent Message-ID: <20171129173621.GB27742@infradead.org> References: <1511763628-11856-1-git-send-email-okaya@codeaurora.org> <1511763628-11856-2-git-send-email-okaya@codeaurora.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1511763628-11856-2-git-send-email-okaya@codeaurora.org> User-Agent: Mutt/1.9.1 (2017-09-22) X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Nov 27, 2017 at 01:20:22AM -0500, Sinan Kaya wrote: > Commit b014e96d1abb ("PCI: Protect pci_error_handlers->reset_notify() usage > with device_lock()") added protection around pci_dev_restore() function so > that device specific remove callback does not cause a race condition > against hotplug. > > pci_dev_lock() usage has been forgotten in two different places in the > code. Adding locks for pci_slot_restore() and moving pci_dev_restore() > inside the locks for pci_try_reset_function(). > > Signed-off-by: Sinan Kaya Looks good, Reviewed-by: Christoph Hellwig From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Return-Path: Date: Wed, 29 Nov 2017 09:36:21 -0800 From: Christoph Hellwig To: Sinan Kaya Subject: Re: [PATCH V2 1/7] PCI: protect restore with device lock to be consistent Message-ID: <20171129173621.GB27742@infradead.org> References: <1511763628-11856-1-git-send-email-okaya@codeaurora.org> <1511763628-11856-2-git-send-email-okaya@codeaurora.org> MIME-Version: 1.0 In-Reply-To: <1511763628-11856-2-git-send-email-okaya@codeaurora.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-pci@vger.kernel.org, timur@codeaurora.org, open list , linux-arm-msm@vger.kernel.org, Bjorn Helgaas , linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+bjorn=helgaas.com@lists.infradead.org List-ID: On Mon, Nov 27, 2017 at 01:20:22AM -0500, Sinan Kaya wrote: > Commit b014e96d1abb ("PCI: Protect pci_error_handlers->reset_notify() usage > with device_lock()") added protection around pci_dev_restore() function so > that device specific remove callback does not cause a race condition > against hotplug. > > pci_dev_lock() usage has been forgotten in two different places in the > code. Adding locks for pci_slot_restore() and moving pci_dev_restore() > inside the locks for pci_try_reset_function(). > > Signed-off-by: Sinan Kaya Looks good, Reviewed-by: Christoph Hellwig _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel From mboxrd@z Thu Jan 1 00:00:00 1970 From: hch@infradead.org (Christoph Hellwig) Date: Wed, 29 Nov 2017 09:36:21 -0800 Subject: [PATCH V2 1/7] PCI: protect restore with device lock to be consistent In-Reply-To: <1511763628-11856-2-git-send-email-okaya@codeaurora.org> References: <1511763628-11856-1-git-send-email-okaya@codeaurora.org> <1511763628-11856-2-git-send-email-okaya@codeaurora.org> Message-ID: <20171129173621.GB27742@infradead.org> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On Mon, Nov 27, 2017 at 01:20:22AM -0500, Sinan Kaya wrote: > Commit b014e96d1abb ("PCI: Protect pci_error_handlers->reset_notify() usage > with device_lock()") added protection around pci_dev_restore() function so > that device specific remove callback does not cause a race condition > against hotplug. > > pci_dev_lock() usage has been forgotten in two different places in the > code. Adding locks for pci_slot_restore() and moving pci_dev_restore() > inside the locks for pci_try_reset_function(). > > Signed-off-by: Sinan Kaya Looks good, Reviewed-by: Christoph Hellwig