dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: Daniel Vetter <daniel@ffwll.ch>
Cc: David Lechner <david@lechnology.com>,
	dri-devel <dri-devel@lists.freedesktop.org>,
	"Rafael J. Wysocki" <rafael@kernel.org>
Subject: Re: devm actions and hw clenaup (was Re: [PATCH 01/11] drm: Add devm_drm_dev_init/register)
Date: Wed, 30 Jan 2019 08:14:56 +0100	[thread overview]
Message-ID: <20190130071456.GA3657@kroah.com> (raw)
In-Reply-To: <CAKMK7uEybF+GTz9AQsOvwJuPLWXAgvOORizCTFrNOQvZogZagQ@mail.gmail.com>

On Wed, Jan 30, 2019 at 12:14:46AM +0100, Daniel Vetter wrote:
> On Tue, Jan 29, 2019 at 8:27 PM Greg KH <gregkh@linuxfoundation.org> wrote:
> > On Tue, Jan 29, 2019 at 07:10:55PM +0100, Daniel Vetter wrote:
> > > The problem is when drivers use devm_ not to allocate hw resources and
> > > related things, but structures for objects with other lifetimes. Like
> > > open file descriptors shared with the world.
> >
> > And irqs, which bites everyone in the end.  You have to be careful here,
> > never tie a devm allocation to an object with another reference count,
> > that's just a bug.
> 
> The classic "I forgot to shut down the interrupt before releasing
> driver structures and now the irq handler oopsed" or something more
> sinister?

The classic is always the best, and most common :)

> gpus definitely needs lots of interrupt stuff, so if that is
> fundamentally broken then our devm ideas won't work out at all.

You better not be using devm for your irqs right now then.

good luck!

greg k-h
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2019-01-30  7:14 UTC|newest]

Thread overview: 57+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-20 11:43 [PATCH 00/11] drm/tinydrm: Remove tinydrm_device Noralf Trønnes
2019-01-20 11:43 ` [PATCH 01/11] drm: Add devm_drm_dev_init/register Noralf Trønnes
2019-01-21  6:11   ` Sam Ravnborg
2019-01-21 13:09     ` Noralf Trønnes
2019-01-21  9:10   ` Daniel Vetter
2019-01-21  9:55     ` Daniel Vetter
2019-01-21 12:21       ` Noralf Trønnes
2019-01-22  9:32         ` Daniel Vetter
2019-01-22 19:07           ` Noralf Trønnes
2019-01-22 19:30             ` Daniel Vetter
2019-01-23 10:54               ` Noralf Trønnes
2019-01-24 10:43                 ` devm actions and hw clenaup (was Re: [PATCH 01/11] drm: Add devm_drm_dev_init/register) Daniel Vetter
2019-01-24 17:46                   ` Greg KH
2019-01-24 17:57                     ` Daniel Vetter
2019-01-29 14:34                       ` Noralf Trønnes
2019-01-29 15:16                         ` Greg KH
2019-01-29 16:50                         ` Daniel Vetter
2019-01-29 17:26                           ` Noralf Trønnes
2019-01-29 17:36                           ` Greg KH
2019-01-29 18:10                             ` Daniel Vetter
2019-01-29 19:27                               ` Greg KH
2019-01-29 23:14                                 ` Daniel Vetter
2019-01-30  7:14                                   ` Greg KH [this message]
2019-01-22  9:35   ` [PATCH 01/11] drm: Add devm_drm_dev_init/register Daniel Vetter
2019-01-20 11:43 ` [PATCH 02/11] drm/modes: Add DRM_SIMPLE_MODE() Noralf Trønnes
2019-01-20 16:37   ` Ilia Mirkin
2019-01-20 17:27     ` Noralf Trønnes
2019-01-20 11:43 ` [PATCH 03/11] drm/simple-kms-helper: Add drm_simple_connector_create() Noralf Trønnes
2019-01-20 22:14   ` Sam Ravnborg
2019-01-21  9:22   ` Daniel Vetter
2019-01-24 14:38     ` Noralf Trønnes
2019-01-24 14:53       ` Hans de Goede
2019-01-25 12:05         ` Noralf Trønnes
2019-01-20 11:43 ` [PATCH 04/11] drm/tinydrm: Remove tinydrm_display_pipe_init() Noralf Trønnes
2019-01-21  6:30   ` Sam Ravnborg
2019-01-21  9:15   ` Daniel Vetter
2019-01-28 14:46     ` Noralf Trønnes
2019-01-20 11:43 ` [PATCH 05/11] drm/tinydrm/mipi-dbi: Add drm_to_mipi_dbi() Noralf Trønnes
2019-01-21  6:34   ` Sam Ravnborg
2019-01-20 11:43 ` [PATCH 06/11] drm/tinydrm: Remove tinydrm_shutdown() Noralf Trønnes
2019-01-21  7:12   ` Sam Ravnborg
2019-01-20 11:43 ` [PATCH 07/11] drm/tinydrm/repaper: Use devm_drm_dev_*() Noralf Trønnes
2019-01-20 22:22   ` Sam Ravnborg
2019-01-20 22:25     ` Sam Ravnborg
2019-01-21 13:15       ` Noralf Trønnes
2019-01-20 11:43 ` [PATCH 08/11] drm/tinydrm: " Noralf Trønnes
2019-01-20 11:43 ` [PATCH 09/11] drm/tinydrm: Remove tinydrm_device Noralf Trønnes
2019-01-21  8:13   ` Sam Ravnborg
2019-01-21  9:29   ` Daniel Vetter
2019-01-21 13:30     ` Noralf Trønnes
2019-01-20 11:43 ` [PATCH 10/11] drm/tinydrm: Use drm_dev_enter/exit() Noralf Trønnes
2019-01-20 11:43 ` [PATCH 11/11] drm/fb-helper: generic: Don't take module ref for fbcon Noralf Trønnes
2019-01-21  9:05   ` Daniel Vetter
2019-01-28 14:40     ` Noralf Trønnes
2019-01-29  8:45       ` Daniel Vetter
2019-01-21  8:34 ` [PATCH 00/11] drm/tinydrm: Remove tinydrm_device Sam Ravnborg
2019-01-21 13:20   ` Noralf Trønnes

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=20190130071456.GA3657@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=daniel@ffwll.ch \
    --cc=david@lechnology.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=rafael@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox