All of lore.kernel.org
 help / color / mirror / Atom feed
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Tejun Heo <tj@kernel.org>
Cc: Dan Williams <dan.j.williams@gmail.com>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: Is devm_* broken ?
Date: Tue, 28 Jul 2015 20:05:49 +0300	[thread overview]
Message-ID: <3561824.rKlMSGlkdL@avalon> (raw)
In-Reply-To: <20150728152225.GA454@mtj.duckdns.org>

On Tuesday 28 July 2015 11:22:25 Tejun Heo wrote:
> 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.

Sounds like a topic for the kernel summit :-) I'll send a proposal.

-- 
Regards,

Laurent Pinchart


  reply	other threads:[~2015-07-28 17:05 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-14 22:34 Is devm_* broken ? Laurent Pinchart
2015-07-15 15:51 ` Takashi Iwai
2015-07-15 16:08   ` Laurent Pinchart
2015-07-15 16:20     ` Takashi Iwai
2015-07-15 16:27       ` Laurent Pinchart
2015-07-15 16:34         ` Takashi Iwai
2015-07-28 14:10           ` Laurent Pinchart
2015-07-15 17:00 ` Dan Williams
2015-07-15 18:03   ` Tejun Heo
2015-07-28 14:16     ` Laurent Pinchart
2015-07-28 15:22       ` Tejun Heo
2015-07-28 17:05         ` Laurent Pinchart [this message]
2015-08-04 19:56           ` Pavel Machek
2015-08-04 21:26             ` Dmitry Torokhov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3561824.rKlMSGlkdL@avalon \
    --to=laurent.pinchart@ideasonboard.com \
    --cc=dan.j.williams@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tj@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.