lkml.org 
[lkml]   [2014]   [Nov]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 1/3] firmware loader: Introduce new API - request_firmware_abort()
On Thu, 13 Nov, at 02:51:28AM, Kweh, Hock Leong wrote:
>
> Hi everyone,
>
> First of all, I would like to apologize if my commit message gives you guys an impression
> that to use request_firmware_abort(), you guys MUST do the synchronization on your own.
> But the fact is, it is not a MUST. Below will provide more detail.
>
> Regarding this synchronization topic, I would like to open a discussion to get a
> better approach to handle this problem. Before jumping onto the design, I would
> like to give a background of why I am doing in this way.
>
> - Only doing module unload is required to be aware of this synchronization
> -> Ensuring the call back does not fall into unloaded code which may cause
> undefined behavior.
> -> Ensuring the put_device() & module_put() code have finished in firmware_class.c
> function request_firmware_work_func() before the device is unregistered
> and module unloaded happen.

Shouldn't the existing module_{put,get}() and {put,get}_device() calls
provide all the necessary synchronisation?

Module unload should not be possible while other code is using the
module (and the module refcnt has been incremented accordindly).

Right?

--
Matt Fleming, Intel Open Source Technology Center


\
 
 \ /
  Last update: 2014-11-17 16:41    [W:0.159 / U:0.308 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site