Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp814346ybn; Tue, 24 Sep 2019 09:55:34 -0700 (PDT) X-Google-Smtp-Source: APXvYqy+OBn/MWF1yy4IDqTx+7QHA5jF4An31rkKOEfI1GvNAlBfpb7V8t3kfq6jOH1iXcElrLGk X-Received: by 2002:a1c:9c96:: with SMTP id f144mr1203974wme.96.1569344134254; Tue, 24 Sep 2019 09:55:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569344134; cv=none; d=google.com; s=arc-20160816; b=j3W+fWK3ZqKxyuYRnjcvGza0mF5pgFkiMmVZnTepI3KjJa/ja/QNr/p5Bocxx9b1aQ sqwwKbWH1D5AWnJ1H0h+JgrFl3spR3qQtwnV8QCvJteYq/9O6tbtv0128/NS6klD00Tf DFgTMJEBbbjqj33fkQcfAoO+tz+Qj+6PTm8LPlH7B5JysrOmVUnbnfcQFT4c88HVOCIN csl7DFsGW0Xi7lPYEamj7pq1JTX5C5GtaacrH1L36bOcHu2itpgfyBi5GTOBjoo6bMKg WXff/4Yboi2ZdZZjp1VuXV3ah8HIfE7jQmWj15A2yT96i/Y3s/Xy1E2qGmN+0VHWLi2T cIDA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=jBegNaS2+xlHzyQEFAn0yvEtceBH6V4j7UMQg8MZmQc=; b=XMBJPr4xZQCDrMSKy2YP+5+8fL0MKwN8iT+OGYict9AVUnretJdlGM9KdO+aTRig/A bC2Rrz1kkk4NuW1DEyfITXCJQq8cz4uW8q0fxxtWNSrSUvopneE13paaiJk8hlTEWxjw v0DoZADUmK3yMGS71T5Pe6KnmhwDKH8QUlO7wdi+sBxkiXMUEkm4adzhWgnN05Pr3IVK qCP/eYa8//+3tsV0qI8Imy/BebXzsGtOgfbxijf76Msq5VyNqv04qCkNltcD77kPBr7i jFX/2ZgsaAULRgXaxVt/7gbQJL0pgzKDoQ8vRgbA0x6ORmZGQTyWaDaJSJ2gr8riTeuO d9og== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o32si1675162edb.63.2019.09.24.09.55.10; Tue, 24 Sep 2019 09:55:34 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2393675AbfIWI2a (ORCPT + 99 others); Mon, 23 Sep 2019 04:28:30 -0400 Received: from bmailout1.hostsharing.net ([83.223.95.100]:37191 "EHLO bmailout1.hostsharing.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2392172AbfIWI23 (ORCPT ); Mon, 23 Sep 2019 04:28:29 -0400 Received: from h08.hostsharing.net (h08.hostsharing.net [IPv6:2a01:37:1000::53df:5f1c:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.hostsharing.net", Issuer "COMODO RSA Domain Validation Secure Server CA" (not verified)) by bmailout1.hostsharing.net (Postfix) with ESMTPS id 87F293000119E; Mon, 23 Sep 2019 10:28:27 +0200 (CEST) Received: by h08.hostsharing.net (Postfix, from userid 100393) id 5ECE832A5C; Mon, 23 Sep 2019 10:28:27 +0200 (CEST) Date: Mon, 23 Sep 2019 10:28:27 +0200 From: Lukas Wunner To: Mika Westerberg Cc: Bjorn Helgaas , "Rafael J. Wysocki" , Keith Busch , Andy Shevchenko , Frederick Lawler , "Gustavo A . R . Silva" , Sinan Kaya , Kai-Heng Feng , linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 2/2] PCI: pciehp: Prevent deadlock on disconnect Message-ID: <20190923082827.mfss42uizrjtalhb@wunner.de> References: <20190812143133.75319-1-mika.westerberg@linux.intel.com> <20190812143133.75319-2-mika.westerberg@linux.intel.com> <20190923053403.jdjw6ed3sub6iuou@wunner.de> <20190923081237.GB2773@lahna.fi.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190923081237.GB2773@lahna.fi.intel.com> User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Sep 23, 2019 at 11:12:37AM +0300, Mika Westerberg wrote: > Regarding suggestion of unbinding PCI drivers without > pci_lock_rescan_remove() hold, I haven't looked it too closely but I > think we need to take that lock anyway because when we are unbinding a > hotplug driver it is supposed to remove the hierarchy below touching the > shared structures, possibly concurrently. Unfortunately there is no > documentation what data pci_lock_rescan_remove() actually protects so > first one needs to understand that. I think one way to clean up this is > to use finer grained locking (with documented lock ordering) for PCI bus > structures that can be accessed simultaneusly by different threads. But > that is not a simple task. Right. I'm (still) working on that, albeit slowly as I'm caught up with other stuff. Thanks, Lukas