Skip to content

Commit

Permalink
[PATCH] PCI: Move pci_dev_put outside a spinlock
Browse files Browse the repository at this point in the history
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: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Alan Stern authored and Greg Kroah-Hartman committed Mar 23, 2006
1 parent 8c4b2cf commit b89b7ea
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/pci/search.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down Expand Up @@ -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;
}

Expand Down

0 comments on commit b89b7ea

Please sign in to comment.