linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Yicong Yang <yangyicong@hisilicon.com>
To: <helgaas@kernel.org>, <linux-pci@vger.kernel.org>
Cc: <f.fangjian@huawei.com>, <huangdaode@huawei.com>
Subject: [PATCH 0/2] PCI: Fix potential deadlock problems
Date: Wed, 5 Feb 2020 17:17:57 +0800	[thread overview]
Message-ID: <1580894277-20671-1-git-send-email-yangyicong@hisilicon.com> (raw)

Currently we use several locks to avoid racing conditions in pci
framework. When involving more than one lock, the inconsistent
lock order will lead to deadlock problems. This patchset aims to
solve the problem by keeping the same lock order in different
processes.

Patch_1: fix the potential deadlock caused by pci_dev_lock() and
VF enable routine.
Patch_2: fix the deadlock caused by AER and sriov enable routine
as reported.

Yicong Yang (2):
  PCI: Change lock order in pci_dev_lock()
  PCI/AER: Fix deadlock triggered by AER and sriov enable routine

 drivers/pci/bus.c      |  8 ++++++++
 drivers/pci/pci.c      | 15 ++++++++-------
 drivers/pci/pci.h      |  4 ++++
 drivers/pci/pcie/err.c | 18 +++++-------------
 4 files changed, 25 insertions(+), 20 deletions(-)

--
2.8.1


             reply	other threads:[~2020-02-05  9:22 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-05  9:17 Yicong Yang [this message]
2020-02-05 17:30 ` [PATCH 0/2] PCI: Fix potential deadlock problems 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=1580894277-20671-1-git-send-email-yangyicong@hisilicon.com \
    --to=yangyicong@hisilicon.com \
    --cc=f.fangjian@huawei.com \
    --cc=helgaas@kernel.org \
    --cc=huangdaode@huawei.com \
    --cc=linux-pci@vger.kernel.org \
    /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).