lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 19 Oct 2022 11:54:42 +0300
From:   Ville Syrjälä <ville.syrjala@...ux.intel.com>
To:     "Rafael J. Wysocki" <rjw@...ysocki.net>
Cc:     Linux PCI <linux-pci@...r.kernel.org>,
        Linux ACPI <linux-acpi@...r.kernel.org>,
        LKML <linux-kernel@...r.kernel.org>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Bjorn Helgaas <helgaas@...nel.org>
Subject: Re: [PATCH] ACPI: PCI: Fix device reference counting in
 acpi_get_pci_dev()

On Tue, Oct 18, 2022 at 07:34:03PM +0200, Rafael J. Wysocki wrote:
> From: Rafael J. Wysocki <rafael.j.wysocki@...el.com>
> 
> 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 <rafael.j.wysocki@...el.com>
> ---
>  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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ