[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [xen] double fault: 0000 [#1] PREEMPT SMP DEBUG_PAGEALLOC



On Tue, Oct 08, 2013 at 10:14:52AM +0800, Fengguang Wu wrote:
> [    2.785188] kobject: 'drm' (ffff880006dae048): kobject_release, parent 
> ffff880000189648 (delayed)
> [    2.787362] kobject: 'drm' (ffff880006dafe00): kobject_release, parent     
>       (null) (delayed)
> [    2.789674] [drm] radeon kernel modesetting enabled.
> [    2.791798] [drm:drm_proc_init] *ERROR* Cannot create /proc/dri/0
> [    2.793280] [drm:drm_get_minor] *ERROR* DRM: Failed to initialize 
> /proc/dri.
> [    2.795591] kobject: 'controlD64' (ffff880006dc3820): kobject_release, 
> parent           (null) (delayed)
> [    2.797988] cirrus: probe of 0000:00:02.0 failed with error -1
> [    2.799675] usbcore: registered new interface driver udl
> [    2.802167] parport_pc 00:04: reported by Plug and Play ACPI
> [    2.803818] parport0: PC-style at 0x378, irq 7 [PCSPP(,...)]
> [    2.806035] kobject: 'parport_pc.956' (ffff880006dc3820): kobject_release, 
> parent           (null) (delayed)

Look very carefully at the above addresses of the controlD64 object and
the parport_pc.956 object.  They're both the same - and the first hasn't
been run yet.  It's a double addition because the culpret is not parport_pc,
but is controlD64 instead.

And here we have it:

int drm_put_minor(struct drm_minor **minor_p)
{
...
        drm_sysfs_device_remove(minor);
...
        kfree(minor);
}

void drm_sysfs_device_remove(struct drm_minor *minor)
{
        if (minor->kdev.parent)
                device_unregister(&minor->kdev);
        minor->kdev.parent = NULL;
}

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?

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.