From: Keith Busch <kbusch@kernel.org>
To: Lukas Wunner <lukas@wunner.de>
Cc: Bjorn Helgaas <helgaas@kernel.org>,
David Hoyer <David.Hoyer@netapp.com>,
linux-pci@vger.kernel.org,
Xiongfeng Wang <wangxiongfeng2@huawei.com>,
Sergey Miroshnichenko <s.miroshnichenko@yadro.com>
Subject: Re: [PATCH] PCI: pciehp: Fix indefinite wait on sysfs requests
Date: Thu, 19 Mar 2020 01:43:15 +0900 [thread overview]
Message-ID: <20200318164315.GA22361@redsun51.ssa.fujisawa.hgst.com> (raw)
In-Reply-To: <cca1effa488065cb055120aa01b65719094bdcb5.1584530321.git.lukas@wunner.de>
On Wed, Mar 18, 2020 at 12:33:12PM +0100, Lukas Wunner wrote:
> Fixes: 54ecb8f7028c ("PCI: pciehp: Avoid returning prematurely from sysfs requests")
> Reported-by: David Hoyer <David.Hoyer@netapp.com>
> Signed-off-by: Lukas Wunner <lukas@wunner.de>
> Cc: stable@vger.kernel.org # v4.19+
> Cc: Keith Busch <kbusch@kernel.org>
Looks good to me.
Reviewed-by: Keith Busch <kbusch@kernel.org>
> drivers/pci/hotplug/pciehp_hpc.c | 14 +++++++-------
> 1 file changed, 7 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/pci/hotplug/pciehp_hpc.c b/drivers/pci/hotplug/pciehp_hpc.c
> index e4627c68b30f..5f1a27bfcb19 100644
> --- a/drivers/pci/hotplug/pciehp_hpc.c
> +++ b/drivers/pci/hotplug/pciehp_hpc.c
> @@ -663,17 +663,15 @@ static irqreturn_t pciehp_ist(int irq, void *dev_id)
> if (atomic_fetch_and(~RERUN_ISR, &ctrl->pending_events) & RERUN_ISR) {
> ret = pciehp_isr(irq, dev_id);
> enable_irq(irq);
> - if (ret != IRQ_WAKE_THREAD) {
> - pci_config_pm_runtime_put(pdev);
> - return ret;
> - }
> + if (ret != IRQ_WAKE_THREAD)
> + goto out;
> }
>
> synchronize_hardirq(irq);
> events = atomic_xchg(&ctrl->pending_events, 0);
> if (!events) {
> - pci_config_pm_runtime_put(pdev);
> - return IRQ_NONE;
> + ret = IRQ_NONE;
> + goto out;
> }
>
> /* Check Attention Button Pressed */
> @@ -702,10 +700,12 @@ static irqreturn_t pciehp_ist(int irq, void *dev_id)
> pciehp_handle_presence_or_link_change(ctrl, events);
> up_read(&ctrl->reset_lock);
>
> + ret = IRQ_HANDLED;
> +out:
> pci_config_pm_runtime_put(pdev);
> ctrl->ist_running = false;
> wake_up(&ctrl->requester);
> - return IRQ_HANDLED;
> + return ret;
> }
>
> static int pciehp_poll(void *data)
> --
> 2.25.0
>
next prev parent reply other threads:[~2020-03-18 16:43 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-14 14:19 Kernel hangs when powering up/down drive using sysfs Hoyer, David
2020-03-16 16:15 ` Keith Busch
2020-03-16 18:10 ` Lukas Wunner
2020-03-16 18:42 ` Keith Busch
2020-03-18 11:53 ` Lukas Wunner
2020-03-16 18:19 ` Lukas Wunner
2020-03-16 18:25 ` Hoyer, David
2020-03-16 21:35 ` Hoyer, David
2020-03-18 11:49 ` Lukas Wunner
2020-03-18 14:06 ` Hoyer, David
2020-03-18 11:33 ` [PATCH] PCI: pciehp: Fix indefinite wait on sysfs requests Lukas Wunner
2020-03-18 16:43 ` Keith Busch [this message]
2020-03-28 20:25 ` Bjorn Helgaas
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200318164315.GA22361@redsun51.ssa.fujisawa.hgst.com \
--to=kbusch@kernel.org \
--cc=David.Hoyer@netapp.com \
--cc=helgaas@kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=lukas@wunner.de \
--cc=s.miroshnichenko@yadro.com \
--cc=wangxiongfeng2@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).