Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp1649640rdb; Thu, 7 Dec 2023 05:24:27 -0800 (PST) X-Google-Smtp-Source: AGHT+IHCmtlFN4tDWDh868FV9kYZJW1x+BD5UFBxadvUoZv9u6kAU7yoLRYLZtDVtfKkwnZPes0K X-Received: by 2002:a05:6a21:a5a4:b0:17d:f127:d435 with SMTP id gd36-20020a056a21a5a400b0017df127d435mr2360630pzc.45.1701955466668; Thu, 07 Dec 2023 05:24:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701955466; cv=none; d=google.com; s=arc-20160816; b=R9B8dirv9/FjoTuAtO5FqUhw363C07qKWq2fysoDLnxjrAfVCdHO2GIHvnhJehJGiG VEBYDXQxXMql58kzW2JLb40baCPafLBFCNwonGhqyihWHXPclQdimwzOfKgT1es76aJL jbiRStNE4fB8AVeL3OBvEg1wyiCrRCsQZRHyZYnM3zrck3lRt8Q3vxIumWb7+jhNtF8/ syO0TJUfj6juhfDyxvzwsdSprcm+sNyDe73the7Le3XYDCyDWC+xJypvVHpKZrB14OVl v/3mYFMlaI7K7iiqNSa6DbY5Np7h+fuIp0vsV2uoxHMGQS95WsgVD0HH9/QfH8Ws61wL diSg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=j3E37LQx5uK/Go+sy8FJx1/gL0lh+yNHgEwFGtCG8mw=; fh=T2mO22MPNvMq49RNMkfMUntUyZdS3ECxzpjHVNAg/T0=; b=Ike/tLVkAfFgJ+23x2GIbxjLnPKEW+MTh+gE5DKHGAtjmg0gDYKSn5QqVpLo+Gl/Xj lQNKo57L5EFkrmnIoSKZkm4hw7pibAQP3UG5lwU1SMc9e691hO/38Ov4pWxxKE2VmRAd c3oOwo0N++Y9HABb0dSZCan+JG3fRisdBpYD+poTFlVTVRU9xCImmYPablBykYGaTDrq H6v6KnzX5XwWIZZXtA5L5UcSKiJ6ihb1ddi6cfnQ67+lhFvnxy4OIU9GBhniu8Cfr15F vo+TZl39rj6XCDQSqdmZ7hbqioa2THn7uUx7pZZuaerliVMjRKGMTVgxgAUTF75SKBEQ e4pA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=gGDYoQUa; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from groat.vger.email (groat.vger.email. [2620:137:e000::3:5]) by mx.google.com with ESMTPS id s11-20020a65690b000000b005c659bf1c70si1180448pgq.206.2023.12.07.05.24.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Dec 2023 05:24:26 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) client-ip=2620:137:e000::3:5; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=gGDYoQUa; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id E16F080990D2; Thu, 7 Dec 2023 05:24:23 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1379555AbjLGNYF (ORCPT + 99 others); Thu, 7 Dec 2023 08:24:05 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52642 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232771AbjLGNYE (ORCPT ); Thu, 7 Dec 2023 08:24:04 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BBCD610CF for ; Thu, 7 Dec 2023 05:24:10 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4CC5BC433C8; Thu, 7 Dec 2023 13:24:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1701955450; bh=Jox1QVTW8FXBAFs6KYjS5LP35vS3J8LsKIserpsx4M4=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=gGDYoQUazfRrRuCGF4JdheCnrSUcHxAIAbG6QHlxeYxdA9W1ASLJ7tmX/W0IndNBP FzxogXB9Ae/rUfISxZEtYCtZ4HUei+hSYS3rK41aQ5sQmFzArfEQuH06HOV21MfZ+m dGY2Qwat3aSBQi3zaerNoRjURTPiEDsr2bKRSiiUzfKP34SJPriCH/UNJoPRvpUhhO /2zRt2YM9VrE8hJaOnMNQ1d+BlOOVel4X+NJgZABowrAjCZvH6s7sHRazn6hCvIIAo zJC+M2aJjfn0EA5EjH+gs7Ox0beesWs7tZ8dZ6lmceyc4KTBmsMvcljuOdNBPQgvjl hmiUksYrzbmvQ== Received: from johan by xi.lan with local (Exim 4.96.2) (envelope-from ) id 1rBENA-0000PW-0p; Thu, 07 Dec 2023 14:25:00 +0100 Date: Thu, 7 Dec 2023 14:25:00 +0100 From: Johan Hovold To: Lorenzo Pieralisi , Krzysztof =?utf-8?Q?Wilczy=C5=84ski?= , Bjorn Helgaas Cc: Andy Gross , Bjorn Andersson , Konrad Dybcio , Manivannan Sadhasivam , Rob Herring , Nirmal Patel , Jonathan Derrick , linux-arm-msm@vger.kernel.org, linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, regressions@leemhuis.info Subject: Re: [PATCH v2 0/6] PCI: Fix deadlocks when enabling ASPM Message-ID: References: <20231128081512.19387-1-johan+linaro@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231128081512.19387-1-johan+linaro@kernel.org> X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Thu, 07 Dec 2023 05:24:24 -0800 (PST) Hi PCI maintainers, On Tue, Nov 28, 2023 at 09:15:06AM +0100, Johan Hovold wrote: > The pci_enable_link_state() helper is currently only called from > pci_walk_bus(), something which can lead to a deadlock as both helpers > take a pci_bus_sem read lock. > > Add a new locked helper which can be called with the read lock held and > fix up the two current users (the second is new in 6.7-rc1). > > Note that there are no users left of the original unlocked variant after > this series, but I decided to leave it in place for now (e.g. to mirror > the corresponding helpers to disable link states). > > Included are also a couple of related cleanups. > Johan Hovold (6): > PCI/ASPM: Add locked helper for enabling link state > PCI: vmd: Fix deadlock when enabling ASPM > PCI: qcom: Fix deadlock when enabling ASPM > PCI: qcom: Clean up ASPM comment > PCI/ASPM: Clean up disable link state parameter > PCI/ASPM: Add lockdep assert to link state helper Could we get this merged for 6.7-rc5? Even if the risk of a deadlock is not that great, this bug prevents using lockdep on Qualcomm platforms so that more locking issues can potentially make their way into the kernel. And for Qualcomm platforms, this is a regression in 6.7-rc1. Johan #regzbot introduced: 9f4f3dfad8cf