mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Cornelia Huck <cornelia.huck@de.ibm.com>
To: Duncan Sands <duncan.sands@math.u-psud.fr>
Cc: Greg K-H <greg@kroah.com>, Alan Stern <stern@rowland.harvard.edu>,
	linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: [Patch 3/3] Driver core: Per-subsystem multithreaded probing.
Date: Mon, 16 Oct 2006 12:56:13 +0200	[thread overview]
Message-ID: <20061016125613.16c9f667@gondolin.boeblingen.de.ibm.com> (raw)
In-Reply-To: <200610161113.31007.duncan.sands@math.u-psud.fr>

On Mon, 16 Oct 2006 11:13:30 +0200,
Duncan Sands <duncan.sands@math.u-psud.fr> wrote:

> There may have been a similar problem with
> USB locking, since there too probe was expecting a lock to be held that might
> not be held when called from the kthread:
> 
> 	 * This function must be called with @dev->sem held.  When called for a
> 	 * USB interface, @dev->parent->sem must be held as well.
> 	 */
> 	int driver_probe_device(struct device_driver * drv, struct device * dev)

But as we don't know we're probing an usb interface, we have no chance
of ensuring that dev->parent->sem is taken in the multithreaded case
(meaning we couldn't do multithreaded probe for usb). (Any idea why the
parent's sem must be taken for usb interfaces?)

> Also, what about device removal racing with probe?  Is it possible for someone to
> attempt to remove a device in the gap between the call to device_attach and the
> kthread actually running and doing the probe?  That would result in remove and
> probe being called in the wrong order...

->probe won't be called if the device is already being removed, but
that still results in bus->remove being called without a prior ->probe
(but not drv->probe since dev->driver is not set at that time).

  reply	other threads:[~2006-10-16 10:55 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-10-16  8:44 Cornelia Huck
2006-10-16  9:13 ` Duncan Sands
2006-10-16 10:56   ` Cornelia Huck [this message]
2006-10-16 14:59     ` Alan Stern
2006-10-16 15:26       ` Cornelia Huck
2006-10-16 15:56         ` Alan Stern
2006-10-16 17:04           ` Cornelia Huck
2006-10-16 21:27             ` Alan Stern
2006-10-16 19:05       ` Duncan Sands
2006-10-16 21:45         ` Alan Stern
2006-10-16 15:11     ` Alan Stern

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=20061016125613.16c9f667@gondolin.boeblingen.de.ibm.com \
    --to=cornelia.huck@de.ibm.com \
    --cc=duncan.sands@math.u-psud.fr \
    --cc=greg@kroah.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=stern@rowland.harvard.edu \
    /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

all inboxes | Powered by JetHome®