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]
Message-ID: <ZvVgTGVSco0Kg7H5@wunner.de>
Date: Thu, 26 Sep 2024 15:23:24 +0200
From: Lukas Wunner <lukas@...ner.de>
To: "Chia-Lin Kao (AceLan)" <acelan.kao@...onical.com>
Cc: Bjorn Helgaas <bhelgaas@...gle.com>,
	Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>,
	linux-pci@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] PCI: pciehp: Fix system hang on resume after hot-unplug
 during suspend

On Thu, Sep 26, 2024 at 08:59:09PM +0800, Chia-Lin Kao (AceLan) wrote:
> Remove unnecessary pci_walk_bus() call in pciehp_resume_noirq(). This
> fixes a system hang that occurs when resuming after a Thunderbolt dock
> with attached thunderbolt storage is unplugged during system suspend.
> 
> The PCI core already handles setting the disconnected state for devices
> under a port during suspend/resume.

Please explain in the commit message where the PCI core does that.

> The redundant bus walk was
> interfering with proper hardware state detection during resume, causing
> a system hang when hot-unplugging daisy-chained Thunderbolt devices.

Please explain what "proper hardware state detection" means.

Did you get a hung task stacktrace?  If so, please include it in the
commit message.

If you're getting a system hang, it means there's a deadlock
involving pci_bus_sem.  I don't quite see how that could happen,
so a more verbose explanation would be appreciated.

Thanks,

Lukas


> Fixes: 9d573d19547b ("PCI: pciehp: Detect device replacement during system sleep")
> Signed-off-by: Chia-Lin Kao (AceLan) <acelan.kao@...onical.com>
> ---
>  drivers/pci/hotplug/pciehp_core.c | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/drivers/pci/hotplug/pciehp_core.c b/drivers/pci/hotplug/pciehp_core.c
> index ff458e692fed..c1c3f7e2bc43 100644
> --- a/drivers/pci/hotplug/pciehp_core.c
> +++ b/drivers/pci/hotplug/pciehp_core.c
> @@ -330,8 +330,6 @@ static int pciehp_resume_noirq(struct pcie_device *dev)
>  		 */
>  		if (pciehp_device_replaced(ctrl)) {
>  			ctrl_dbg(ctrl, "device replaced during system sleep\n");
> -			pci_walk_bus(ctrl->pcie->port->subordinate,
> -				     pci_dev_set_disconnected, NULL);
>  			pciehp_request(ctrl, PCI_EXP_SLTSTA_PDC);
>  		}
>  	}
> -- 
> 2.43.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ