]> git.ipfire.org Git - people/arne_f/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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 22 Sep 2021 10:39:28 +0000 (12:39 +0200)
commit1104ea6b8e2a24956116562965e68d2a540e3e37
tree67e32d705cc7e3e3c719345b18d35c79488c0601
parent619b6ad1b13595aef3281f0ffe1fad3c5e48aac5
PCI: Fix pci_dev_str_match_path() alloc while atomic bug

[ 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>
drivers/pci/pci.c