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]
Message-ID: <CAAd53p5+ngpAB+J_Hshug61bCCCoec=LveeAUSrtAd_UP6gSoQ@mail.gmail.com>
Date:   Fri, 6 Oct 2023 13:00:15 +0800
From:   Kai-Heng Feng <kai.heng.feng@...onical.com>
To:     Ulf Hansson <ulf.hansson@...aro.org>
Cc:     Ricky WU <ricky_wu@...ltek.com>, "arnd@...db.de" <arnd@...db.de>,
        "gregkh@...uxfoundation.org" <gregkh@...uxfoundation.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "linux-mmc@...r.kernel.org" <linux-mmc@...r.kernel.org>
Subject: Re: [PATCH] misc: rtsx: Fix an error access Page fault

Ricky,

On Tue, Sep 26, 2023 at 11:04 PM Ulf Hansson <ulf.hansson@...aro.org> wrote:
>
> On Thu, 14 Sept 2023 at 16:47, Ulf Hansson <ulf.hansson@...aro.org> wrote:
> >
> > On Wed, 6 Sept 2023 at 10:03, Ricky WU <ricky_wu@...ltek.com> wrote:
> > >
> > > an error occurs on insert SD7.0 card.
> > > The pci slot of rtsx_pci will Link Down when the SD7.0 card inserted,
> > > but the rtsx_pci not exit from runtime_idle at that time,
> > > then do the power_saving function to access the wrong resource
> > >
> > > Fixes: 597568e8df04 ("misc: rtsx: Rework runtime power management flow")
> > > Cc: Kai-Heng Feng <kai.heng.feng@...onical.com>
> > > Signed-off-by: Ricky Wu <ricky_wu@...ltek.com>
> >
> > Applied for fixes, thanks!
>
> This was not ready to be applied, my bad! Fortunately, I haven't
> submitted a pull-request with this yet, so I am simply dropping the
> patch for now, to make sure we find the proper solution.

Can you please see if the following change helps:

diff --git a/drivers/pci/hotplug/pciehp_pci.c b/drivers/pci/hotplug/pciehp_pci.c
index ad12515a4a121..89480e31c2266 100644
--- a/drivers/pci/hotplug/pciehp_pci.c
+++ b/drivers/pci/hotplug/pciehp_pci.c
@@ -18,9 +18,18 @@
 #include <linux/kernel.h>
 #include <linux/types.h>
 #include <linux/pci.h>
+#include <linux/pm_runtime.h>
 #include "../pci.h"
 #include "pciehp.h"

+int pciehp_pm_runtime_barrier(struct pci_dev *pdev, void *unused)
+{
+       pm_runtime_barrier(&pdev->dev);
+       pci_dev_set_disconnected(pdev, NULL);
+
+       return 0;
+}
+
 /**
  * pciehp_configure_device() - enumerate PCI devices below a hotplug bridge
  * @ctrl: PCIe hotplug controller
@@ -98,7 +107,7 @@ void pciehp_unconfigure_device(struct controller
*ctrl, bool presence)
                 __func__, pci_domain_nr(parent), parent->number);

        if (!presence)
-               pci_walk_bus(parent, pci_dev_set_disconnected, NULL);
+               pci_walk_bus(parent, pciehp_pm_runtime_barrier, NULL);

        pci_lock_rescan_remove();


>
> [...]
>
> Kind regards
> Uffe

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ