[PATCH 2/2] ath10k: make core registering async
Michal Kazior
michal.kazior at tieto.com
Mon Jun 23 05:59:42 PDT 2014
On 23 June 2014 14:32, Johannes Berg <johannes at sipsolutions.net> wrote:
> On Mon, 2014-06-23 at 14:17 +0200, Michal Kazior wrote:
>
>> > Seems like to fix it we just need to get a module reference though? Can
>> > a module put() itself though? Hmmm.
>>
>> It seems some drivers use module_put(THIS_MODULE) and
>> __module_get(THIS_MODULE), e.g. tun/tap driver.
>
> I don't see how this isn't racy in similar ways though?
I think tun/tap uses it for different purposes.
>> But does this bump up the module refcount in such a way that an
>> in-progress rmmod will wait/block until the refcount reaches 0?
>
> It should, yes, but you race once you do module_put(), no?
It's still racy, I agree.
I don't see how device_release_driver() can be made work synchronously
at all. It should, however, be perfectly fine if this was an async
request to release a device/driver, right?
Michał
More information about the ath10k
mailing list