]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commit
PCI: Fix pci_dev_str_match_path() alloc while atomic bug
authorDan Carpenter <dan.carpenter@oracle.com>
Thu, 12 Aug 2021 07:00:04 +0000 (10:00 +0300)
committerStefan Bader <stefan.bader@canonical.com>
Fri, 5 Nov 2021 09:19:31 +0000 (10:19 +0100)
commitbbd59364b699c9247b8841401fcc0e683eb99585
tree615f4be3f81b1f3f2d3cac111b3dbb57e67ecc93
parentf41caac58ef066ed4b013a8c1128b5b1761787ae
PCI: Fix pci_dev_str_match_path() alloc while atomic bug

BugLink: https://bugs.launchpad.net/bugs/1948873
[ Upstream commit 7eb6ea4148579b85540a41d57bcec315b8af8ff8 ]

pci_dev_str_match_path() is often called with a spinlock held so the
allocation has to be atomic.  The call tree is:

  pci_specified_resource_alignment() <-- takes spin_lock();
    pci_dev_str_match()
      pci_dev_str_match_path()

Fixes: 45db33709ccc ("PCI: Allow specifying devices using a base bus and path of devfns")
Link: https://lore.kernel.org/r/20210812070004.GC31863@kili
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Logan Gunthorpe <logang@deltatee.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Kelsey Skunberg <kelsey.skunberg@canonical.com>
drivers/pci/pci.c