All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pavel Machek <pavel@ucw.cz>
To: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: Tejun Heo <tj@kernel.org>,
	Dan Williams <dan.j.williams@gmail.com>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: Is devm_* broken ?
Date: Tue, 4 Aug 2015 21:56:31 +0200	[thread overview]
Message-ID: <20150804195631.GB28564@amd> (raw)
In-Reply-To: <3561824.rKlMSGlkdL@avalon>

On Tue 2015-07-28 20:05:49, Laurent Pinchart wrote:
> 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.

Hmm. But that means that devm_ everything is broken for 6 months or
so, right?

Does it mean we should stop taking new devm_ conversions at the very
least?

									Pavel
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

  reply	other threads:[~2015-08-04 19:56 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
2015-08-04 19:56           ` Pavel Machek [this message]
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=20150804195631.GB28564@amd \
    --to=pavel@ucw.cz \
    --cc=dan.j.williams@gmail.com \
    --cc=laurent.pinchart@ideasonboard.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.