mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Russell King - ARM Linux <linux@arm.linux.org.uk>
To: Dave Airlie <airlied@linux.ie>
Cc: Fengguang Wu <fengguang.wu@intel.com>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	xen-devel@lists.xenproject.org,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Subject: Re: [xen] double fault: 0000 [#1] PREEMPT SMP DEBUG_PAGEALLOC
Date: Thu, 10 Oct 2013 10:19:20 +0100	[thread overview]
Message-ID: <20131010091920.GO25034@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <alpine.DEB.2.00.1310100322040.14436@skynet.skynet.ie>

On Thu, Oct 10, 2013 at 03:23:45AM +0100, Dave Airlie wrote:
> 
> > I think David Arlie also needs a quiet talking to about how to use the
> > device model:
> > 
> > int drm_sysfs_device_add(struct drm_minor *minor)
> > {
> >         minor->kdev.release = drm_sysfs_device_release;
> > ...
> >         err = device_register(&minor->kdev);
> > }
> > 
> > static void drm_sysfs_device_release(struct device *dev)
> > {
> >         memset(dev, 0, sizeof(struct device));
> >         return;
> > }
> > 
> > Since when has that been acceptable in a release function?
> 
> Well the commit that added it had a reason that seems to cover some other 
> device model abuses, so maybe someone who actually understands the device 
> model (all 2 people) can review usage.

Please - there's more than two people who understand this stuff.

You appear to manage to understand the refcounting principle for things
like the DRM framebuffers, DRM buffer objects etc, and the driver model
(and kobjects in general) are no different.

I've just been reading the code around here little more, and hit the usb
implementation.  I don't see how USB drivers get cleaned up when they're
disconnected from the USB bus.  I see drm_unplug_dev() which gets called
on a USB disconnection (from udl/udl_drv.c) which effectively makes the
device unavailable, but I don't see anything which frees anything.  I see
nothing calling drm_put_dev() here.  How does the drm_device in this case
get freed?

  parent reply	other threads:[~2013-10-10  9:19 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-06  8:23 Fengguang Wu
2013-10-06 17:26 ` Linus Torvalds
2013-10-07  2:11   ` Fengguang Wu
2013-10-07  5:10     ` Fengguang Wu
2013-10-07  8:12       ` Linus Torvalds
     [not found]         ` <20131007083505.GA22585@localhost>
2013-10-07 22:14           ` Linus Torvalds
2013-10-07 22:29             ` Russell King - ARM Linux
2013-10-07 23:33               ` Russell King - ARM Linux
2013-10-07 23:47             ` Linus Torvalds
2013-10-08  2:09               ` Fengguang Wu
2013-10-08  2:14                 ` Fengguang Wu
2013-10-08  2:36                   ` Fengguang Wu
2013-10-08  3:07                     ` Linus Torvalds
2013-10-08  2:51                   ` Linus Torvalds
2013-10-08  3:11                     ` Fengguang Wu
2013-10-08  3:29                       ` Linus Torvalds
2013-10-08  3:35                         ` Fengguang Wu
2013-10-08  4:35                           ` [DRM_CURRUS_QEMU/timer] WARNING: CPU: 0 PID: 1 at debug_print_object() Fengguang Wu
2013-10-08 12:17                       ` [xen] double fault: 0000 [#1] PREEMPT SMP DEBUG_PAGEALLOC Fengguang Wu
2013-10-08 22:14                         ` Russell King - ARM Linux
2013-10-08 22:48                           ` Greg Kroah-Hartman
2013-10-09  0:45                             ` Linus Torvalds
2013-10-09  1:18                               ` Dave Jones
2013-10-09  1:26                                 ` [PATCH] kobject: show debug info on delayed kobject release Fengguang Wu
2013-10-09 14:47                                   ` Russell King - ARM Linux
2013-10-09 14:12                               ` [xen] double fault: 0000 [#1] PREEMPT SMP DEBUG_PAGEALLOC Josh Boyer
2013-10-09  0:46                             ` Fengguang Wu
2013-10-08  8:06                   ` Russell King - ARM Linux
2013-10-10  2:23                     ` Dave Airlie
2013-10-10  2:38                       ` Linus Torvalds
2013-10-10  9:19                       ` Russell King - ARM Linux [this message]
2013-10-10 10:53                         ` Russell King - ARM Linux
2013-10-11  3:55                           ` Dave Airlie
2013-10-11  4:28                             ` Dave Airlie
2013-10-11  5:14                           ` Fengguang Wu
2013-10-23 11:20                             ` Xiong Zhou
2013-10-08  2:43                 ` Linus Torvalds
2013-10-08  7:58             ` Ingo Molnar
2013-10-08  8:20               ` Fengguang Wu
2013-10-08  8:26                 ` Ingo Molnar
2013-10-08  9:34                   ` Ingo Molnar
2013-10-06 22:14 Boris Ostrovsky

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=20131010091920.GO25034@n2100.arm.linux.org.uk \
    --to=linux@arm.linux.org.uk \
    --cc=airlied@linux.ie \
    --cc=fengguang.wu@intel.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@linux-foundation.org \
    --cc=xen-devel@lists.xenproject.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

all inboxes | Powered by JetHome®