提交 b89b7ea0 编写于 作者: A Alan Stern 提交者: Greg Kroah-Hartman

[PATCH] PCI: Move pci_dev_put outside a spinlock

This patch (as659) fixes a might_sleep problem in the PCI core, by moving
a call to pci_dev_put() outside the scope of a spinlock.
Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
上级 8c4b2cf9
......@@ -246,9 +246,9 @@ pci_get_subsys(unsigned int vendor, unsigned int device,
}
dev = NULL;
exit:
pci_dev_put(from);
dev = pci_dev_get(dev);
spin_unlock(&pci_bus_lock);
pci_dev_put(from);
return dev;
}
......@@ -339,9 +339,9 @@ struct pci_dev *pci_get_class(unsigned int class, struct pci_dev *from)
}
dev = NULL;
exit:
pci_dev_put(from);
dev = pci_dev_get(dev);
spin_unlock(&pci_bus_lock);
pci_dev_put(from);
return dev;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册