lkml.org 
[lkml]   [2012]   [Sep]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH] driver core: fix possible missing of device probe
From
On Fri, Sep 28, 2012 at 9:55 PM, Russell King - ARM Linux
<linux@arm.linux.org.uk> wrote:
>> I do not mention threads case in one CPU because the context in
>> which device_add runs will always see the driver added into
>
> There you go again. Look at my _much_ better description of the problem
> and you'll notice that device_add has nothing to do with this.

OK, I explain it again:

CPU0 CPU1

driver_register
...
bus_add_driver
driver_attach
device_add(devb)

klist_add_tail(klist_drivers)

When device_add(devb) is run just after completion of driver_attach
and before klist_add_tail(klist_drivers), the 'devb' can't be probed
in device_add because the driver hasn't been added into bus,
and it wasn't be probed in driver_attach because driver_attach didn't
see the device in the bus.

So the 'devb' will be missed to be probed in the bus, won't it?


Thanks,
--
Ming Lei


\
 
 \ /
  Last update: 2012-09-28 17:01    [W:0.036 / U:0.724 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site