From: Martin Diehl <lists@mdiehl.de>
To: linux-hotplug@vger.kernel.org
Subject: Re: [PATCH] PCI device list locking
Date: Wed, 06 Mar 2002 01:31:15 +0000 [thread overview]
Message-ID: <marc-linux-hotplug-101537822105734@msgid-missing> (raw)
In-Reply-To: <marc-linux-hotplug-101528672932410@msgid-missing>
On Mon, 4 Mar 2002, Greg KH wrote:
> > + spin_lock(&pcidevlist_lock);
> > pci_for_each_dev(dev) {
> > if (!pci_dev_driver(dev))
> > count += pci_announce_device(drv, dev);
> > }
> > + spin_unlock(&pcidevlist_lock);
>
> pci_announce_device() calls the pci driver's probe() function, which can
> easily sleep. Not a good thing :(
Unless I missed something even a semaphore might deadlock then:
think of a pci driver for bridge-type device which has devices already
attached when probed - for example cardbus (or hotplug) controller with
device on the downside. If the devices are found during probe(), the
driver might want to just add them in one go.
Martin
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
next prev parent reply other threads:[~2002-03-06 1:31 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-03-04 23:54 [PATCH] PCI device list locking john stultz
2002-03-05 0:17 ` Greg KH
2002-03-05 1:05 ` john stultz
2002-03-05 1:12 ` Craig Christophel
2002-03-05 1:47 ` john stultz
2002-03-06 1:31 ` Martin Diehl [this message]
2002-03-10 12:07 ` Martin Mares
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=marc-linux-hotplug-101537822105734@msgid-missing \
--to=lists@mdiehl.de \
--cc=linux-hotplug@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).