public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Ming Lei <tom.leiming@gmail.com>, Kay Sievers <kay@vrfy.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Johannes Berg <johannes@sipsolutions.net>,
	Larry Finger <Larry.Finger@lwfinger.net>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	systemd-devel@lists.freedesktop.org
Subject: Re: udev 182: response timeout for request_firmware in module_probe path
Date: Mon, 27 Aug 2012 02:04:00 +1000	[thread overview]
Message-ID: <1345997040.5138.1.camel@pasglop> (raw)
In-Reply-To: <20120823174613.0489837d@pyramind.ukuu.org.uk>

On Thu, 2012-08-23 at 17:46 +0100, Alan Cox wrote:
> > IMO, the driver probing path is allowed to sleep, so looks request
> firmware
> > should be allowed inside .probe().
> 
> I'm not convinced about that. It can sleep but its holding various
> locks
> in most cases, and it looks like that can end up in a complete heap.
> 
> By all means *request* the firmware asynchronously in the probe, but
> there needs to be a seperate method somewhere after the probe to
> finish
> the job once the firmware appears. 

Not necessarily enough in the general case, for example some stacks will
cause a driver open to be call back from somewhere within the
register_foo() the driver did to register itself with it's subsystem
inside probe. For example register_framebuffer(), register_netdev(), ...

This is clearly a udev bug :-)

Cheers,
Ben.



  parent reply	other threads:[~2012-08-26 16:04 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-21  5:34 udev 182: response timeout for request_firmware in module_probe path Ming Lei
2012-08-23 15:16 ` Ming Lei
2012-08-23 15:31   ` Kay Sievers
2012-08-23 16:04     ` Ming Lei
2012-08-23 16:46       ` Alan Cox
2012-08-23 17:03         ` Ming Lei
2012-08-26 16:04         ` Benjamin Herrenschmidt [this message]
2012-08-25 18:59     ` Linus Torvalds

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=1345997040.5138.1.camel@pasglop \
    --to=benh@kernel.crashing.org \
    --cc=Larry.Finger@lwfinger.net \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=gregkh@linuxfoundation.org \
    --cc=johannes@sipsolutions.net \
    --cc=kay@vrfy.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=systemd-devel@lists.freedesktop.org \
    --cc=tom.leiming@gmail.com \
    --cc=torvalds@linux-foundation.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