lkml.org 
[lkml]   [2014]   [Apr]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [RESEND] drivercore: deferral race condition fix
Date
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.






\
 
 \ /
  Last update: 2014-04-08 13:41    [W:0.090 / U:7.764 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site