Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp736201rwi; Wed, 19 Oct 2022 02:09:36 -0700 (PDT) X-Google-Smtp-Source: AMsMyM51lahnS89XABspq1CfN40zsGaP+RUJ8MLMB2vO9B+w8oQ5qqB2DoFYy9ok0yMWpUJTrGBy X-Received: by 2002:a05:6402:847:b0:45b:d50c:b9aa with SMTP id b7-20020a056402084700b0045bd50cb9aamr6353135edz.289.1666170576047; Wed, 19 Oct 2022 02:09:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666170576; cv=none; d=google.com; s=arc-20160816; b=a88xcOJVNCJmXhYwnx+6/asjMMZCu9IVJjFd1/qtViL7ekrnSXNqMfwWFGlaKlpSD5 pP6z6v1c5Ma71zT8Z7ka4A3g/nYp4LF6/jMZHp0RG3JSKapZyslfnDLrIpnVJAJdbD85 2DuywhQj42HjcK8SPZYCI/CCAfAbFmdYGQBUi2Emn1z9y9v/XdAN6H0t9/Hm0R6KTxEk B7Kk1b1j6irzrIvbTxYJXxMYqF8sDHZRLYhu3cC3D0PQCh8p16c4Zs4cirYttRpzBfOl V+P4Ky0jCEE+x0XC3iIbyZBgM73tBk5wpbyTL04kGNl4CCzYW1uPaAiXqvUYCrWBKYm9 r92w== 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-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=ImsiMa++BFziD4dX05KYp11ijPjW9+vqDKDFnPAjY/I=; b=JUmMK/wKnrA+AOgCu8Gt1364zr+q+q1ZO5FXAISslQ7ZwGTnU5tEes24Jov4hJi+K1 EqqZDfv2Up4IEJNtKxn/oX+HUmoGYH8Fvu3YR+jNpX5hiVlbgrfTgFlr+yu4ZhcmphnW TO6lTsWUf8D2QecNoNZNljdcpYhN74yhLgwIyk4A15Vw9yzV0iaP6zMPwAcy6D6IP3mC /fvRs1XnrR7El6WfxOsNP/dex2EhfkxogGEMGlc7KlucgNRWE7Kc+NLY3aajC4YNTVrc /t//2XFkt3XIeshYK0Aj6XLhGqm/kXIN/0buJD+fG84g8UlQbydFptI4BoNu9RjDFaDP keNA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=TjxMdgtp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id dn15-20020a17090794cf00b007919a242731si5523543ejc.95.2022.10.19.02.09.11; Wed, 19 Oct 2022 02:09:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=TjxMdgtp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232212AbiJSJCy (ORCPT + 99 others); Wed, 19 Oct 2022 05:02:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41620 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232077AbiJSJAY (ORCPT ); Wed, 19 Oct 2022 05:00:24 -0400 Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EE17F6A48F; Wed, 19 Oct 2022 01:55:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1666169728; x=1697705728; h=date:from:to:cc:subject:message-id:references: mime-version:content-transfer-encoding:in-reply-to; bh=tluH/Cm9rHuVo1oqk9kZY3xo8Ij2/appO2LxOuExjnw=; b=TjxMdgtpg7Kof2qdPkLIEEIc9Fp+Z0IV+xyoa/V89FuDRT/7WcaldT4H YtxY5y1gdXvpWMTx9IYwJcWd3ZuTPSlR4rDa3gZ7tfAwXI3E+MBk7LGWv +agUWxx0UmKjC+USuDEj/hqVLLFQhH7iHMc+4HPR4f7aWDlWmLJTdCXzS joTGmQH96vncOv/45RIcKfqJzQnxYru1x2kxgghYUsqOFowicnsaGWrLc cIWWgymNTh9dI95EEJ89oOXac00DPryirAnVnz9Nb2200eIJKZgglXyNg BCCHN+8gkP/i/8fulVYZrFCkmn5PFo8xQK2ZoIbuLk8Gqbxzt5FBEGqww g==; X-IronPort-AV: E=McAfee;i="6500,9779,10504"; a="392651196" X-IronPort-AV: E=Sophos;i="5.95,195,1661842800"; d="scan'208";a="392651196" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Oct 2022 01:54:47 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10504"; a="629154024" X-IronPort-AV: E=Sophos;i="5.95,195,1661842800"; d="scan'208";a="629154024" Received: from stinkpipe.fi.intel.com (HELO stinkbox) ([10.237.72.191]) by orsmga002.jf.intel.com with SMTP; 19 Oct 2022 01:54:43 -0700 Received: by stinkbox (sSMTP sendmail emulation); Wed, 19 Oct 2022 11:54:42 +0300 Date: Wed, 19 Oct 2022 11:54:42 +0300 From: Ville =?iso-8859-1?Q?Syrj=E4l=E4?= To: "Rafael J. Wysocki" Cc: Linux PCI , Linux ACPI , LKML , Greg Kroah-Hartman , Bjorn Helgaas Subject: Re: [PATCH] ACPI: PCI: Fix device reference counting in acpi_get_pci_dev() Message-ID: References: <12097002.O9o76ZdvQC@kreacher> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <12097002.O9o76ZdvQC@kreacher> X-Patchwork-Hint: comment X-Spam-Status: No, score=-4.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Oct 18, 2022 at 07:34:03PM +0200, Rafael J. Wysocki wrote: > From: Rafael J. Wysocki > > Commit 63f534b8bad9 ("ACPI: PCI: Rework acpi_get_pci_dev()") failed > to reference count the device returned by acpi_get_pci_dev() as > expected by its callers which in some cases may cause device objects > to be dropped prematurely. > > Add the missing get_device() to acpi_get_pci_dev(). > > Fixes: 63f534b8bad9 ("ACPI: PCI: Rework acpi_get_pci_dev()") FYI this (and the rtc-cmos regression discussed in https://lore.kernel.org/linux-acpi/5887691.lOV4Wx5bFT@kreacher/) took down the entire Intel gfx CI. I've applied both fixes into our fixup branch and things are looking much healthier now. This one caused i915 selftests to eat a lot of POISON_FREE in the CI. While bisecting it locally I didn't have poisoning enabled so I got refcount_t undeflows instead. https://intel-gfx-ci.01.org/tree/drm-tip/index.html has a lot of colorful boxes to click if you're interested in any of the logs. The fixes are included in the CI_DRM_12259 build. Earlier builds were broken. > Signed-off-by: Rafael J. Wysocki > --- > drivers/acpi/pci_root.c | 1 + > 1 file changed, 1 insertion(+) > > Index: linux-pm/drivers/acpi/pci_root.c > =================================================================== > --- linux-pm.orig/drivers/acpi/pci_root.c > +++ linux-pm/drivers/acpi/pci_root.c > @@ -323,6 +323,7 @@ struct pci_dev *acpi_get_pci_dev(acpi_ha > > list_for_each_entry(pn, &adev->physical_node_list, node) { > if (dev_is_pci(pn->dev)) { > + get_device(pn->dev); > pci_dev = to_pci_dev(pn->dev); > break; > } > > > -- Ville Syrj?l? Intel