lkml.org 
[lkml]   [2015]   [Jul]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Is devm_* broken ?
Hello, Laurent.

On Tue, Jul 28, 2015 at 05:16:16PM +0300, Laurent Pinchart wrote:
> Using devm_kzalloc() in such a way has value though, and reverting drivers to
> the pre-devm memory allocation code would make error handling and cleanup code
> paths more complex again. Should we introduce a managed allocator for that
> purpose that would have a lifespan explicitly handled by drivers ?

I don't know. Sure, we can have memory allocations which are tied to
open file; however, the distinction between that and regular devm
resources, which can't linger on no matter what, would be subtle and
confusing. IMHO, a better approach would be implmenting generic
revoke feature and sever open files on driver detach so that
everything can be shutdown then.

Thanks.

--
tejun


\
 
 \ /
  Last update: 2015-07-28 17:41    [W:8.725 / U:0.192 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site