mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Grant Likely <grant.likely@secretlab.ca>
To: Mark Brown <broonie@kernel.org>, Peter Ujfalusi <peter.ujfalusi@ti.com>
Cc: gregkh@linuxfoundation.org, lgirdwood@gmail.com,
	linux-kernel@vger.kernel.org
Subject: Re: [RESEND] drivercore: deferral race condition fix
Date: Tue, 08 Apr 2014 11:27:31 +0100	[thread overview]
Message-ID: <20140408102731.6C331C40933@trevor.secretlab.ca> (raw)
In-Reply-To: <20140403094059.GR14763@sirena.org.uk>

On Thu, 3 Apr 2014 10:40:59 +0100, Mark Brown <broonie@kernel.org> wrote:
> On Thu, Apr 03, 2014 at 10:12:07AM +0300, Peter Ujfalusi wrote:
> > When the kernel is built with CONFIG_PREEMPT it is possible to reach a state
> > when all modules loaded but some driver still stuck in the deferred list
> > and there is a need for external event to kick the deferred queue to probe
> > these drivers.
> 
> Acked-by: Mark Brown <broonie@linaro.org>

It's a pretty crude solution though. The problem is any "in-flight"
probes that are going to defer will not get added to the active list.
Rerunning the entire active list is a bit much (but it does have the
advantage of still being conceptually simple). I think we can do better.

Instead of running the entire list, we could add a check to
driver_deferred_probe_add() that adds the device to the active list
instead of pending list on the condition that another driver probe
completed while the deferred probe was in-flight.

I'm playing with a solution now. I'll email a proposal shortly.

g.





  reply	other threads:[~2014-04-08 10:37 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-03  7:12 Peter Ujfalusi
2014-04-03  9:40 ` Mark Brown
2014-04-08 10:27   ` Grant Likely [this message]
2014-04-08 12:47     ` Grant Likely
2014-04-08 13:16       ` Peter Ujfalusi
2014-04-08 12:43 ` Grant Likely
2014-04-08 13:35   ` Peter Ujfalusi
2014-04-09  7:03     ` Peter Ujfalusi

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=20140408102731.6C331C40933@trevor.secretlab.ca \
    --to=grant.likely@secretlab.ca \
    --cc=broonie@kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=peter.ujfalusi@ti.com \
    /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®