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] [day] [month] [year] [list]
Date:	Thu, 19 Sep 2013 14:51:15 -0600
From:	Bjorn Helgaas <bhelgaas@...gle.com>
To:	"Rafael J. Wysocki" <rjw@...k.pl>
Cc:	Linux PCI <linux-pci@...r.kernel.org>,
	ACPI Devel Maling List <linux-acpi@...r.kernel.org>,
	LKML <linux-kernel@...r.kernel.org>,
	Linux PM list <linux-pm@...r.kernel.org>,
	Huang Ying <ying.huang@...el.com>,
	Matthew Garrett <mjg59@...f.ucam.org>,
	"David E. Box" <david.e.box@...el.com>
Subject: Re: [PATCH] PCI / ACPI / PM: Clear pme_poll for devices in D3cold on wakeup

On Fri, Sep 13, 2013 at 7:38 PM, Rafael J. Wysocki <rjw@...k.pl> wrote:
> From: Rafael J. Wysocki <rafael.j.wysocki@...el.com>
>
> Commit 448bd85 (PCI/PM: add PCIe runtime D3cold support) added a
> piece of code to pci_acpi_wake_dev() causing that function to behave
> in a special way for devices in D3cold (so that their configuration
> registeres are not accessed before those devices are resumed).

s/registeres/registers/

> However, it didn't take the clearing of the pme_poll flag into
> account.  That has to be done for all devices, even if they are in
> D3cold, or pci_pme_list_scan() will not know that wakeup has been
> signaled for the device and will poll its PME Status bit
> unnecessarily.
>
> Fix the problem by moving the clearing of the pme_poll flag in
> pci_acpi_wake_dev() before the code introduced by commit 448bd85.
>
> Reported-and-tested-by: David E. Box <david.e.box@...el.com>
> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@...el.com>

Acked-by: Bjorn Helgaas <bhelgaas@...gle.com>

> Cc: 3.6+ <stable@...r.kernel.org> # 3.6+
> ---
>  drivers/pci/pci-acpi.c |    6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
>
> Index: linux-pm/drivers/pci/pci-acpi.c
> ===================================================================
> --- linux-pm.orig/drivers/pci/pci-acpi.c
> +++ linux-pm/drivers/pci/pci-acpi.c
> @@ -47,6 +47,9 @@ static void pci_acpi_wake_dev(acpi_handl
>         if (event != ACPI_NOTIFY_DEVICE_WAKE || !pci_dev)
>                 return;
>
> +       if (pci_dev->pme_poll)
> +               pci_dev->pme_poll = false;
> +
>         if (pci_dev->current_state == PCI_D3cold) {
>                 pci_wakeup_event(pci_dev);
>                 pm_runtime_resume(&pci_dev->dev);
> @@ -57,9 +60,6 @@ static void pci_acpi_wake_dev(acpi_handl
>         if (pci_dev->pme_support)
>                 pci_check_pme_status(pci_dev);
>
> -       if (pci_dev->pme_poll)
> -               pci_dev->pme_poll = false;
> -
>         pci_wakeup_event(pci_dev);
>         pm_runtime_resume(&pci_dev->dev);
>
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ