On Mon, Aug 16, 2010 at 06:43:20AM +1000, matthew green wrote:
>
>
> thanks for looking into this problem. we need a solution.
No problem.
> would device_lookup() and device_lookup_private() take a reference
> on this count automatically? or maybe some new API that does it,
> to avoid the need to audit every driver at once.
Thanks for asking the question. Device_lookup() needs to
device_acquire(dv) before dropping its lock on the cfdriver_t array[1]
and returning dv.
I had planned to audit all of the drivers, but that could get out of
hand. I like your idea of using a new API. I'll give it some thought.
Dave
[1] Actually, it takes the alldevs lock, today. Finer locking
granularity, such as a cfdriver_t lock, is desirable!
--
David Young OJC Technologies
[email protected] Urbana, IL * (217) 278-3933