]> git.baikalelectronics.ru Git - kernel.git/commit
drm/sysfs: sort out minor and connector device object lifetimes.
authorDave Airlie <airlied@redhat.com>
Fri, 11 Oct 2013 04:07:25 +0000 (14:07 +1000)
committerDave Airlie <airlied@redhat.com>
Tue, 22 Oct 2013 08:37:40 +0000 (09:37 +0100)
commit1a80e88745950db39866d888aea0b71d8485b137
treee4ae9a441e4b2c4739902e4914852696accf1682
parentd190bf36babcf98adf8362186124f59a36bce482
drm/sysfs: sort out minor and connector device object lifetimes.

So drm was abusing device lifetimes, by having embedded device structures
in the minor and connector it meant that the lifetime of the internal drm
objects (drm_minor and drm_connector) were tied to the lifetime of the device
files in sysfs, so if something kept those files opened the current code
would kfree the objects and things would go downhill from there.

Now in reality there is no need for these lifetimes to be so intertwined,
especailly with hotplugging of devices where we wish to remove the sysfs
and userspace facing pieces before we can unwind the internal objects due
to open userspace files or mmaps, so split the objects out so the struct
device is no longer embedded and do what fbdev does and just allocate
and remove the sysfs inodes separately.

Signed-off-by: Dave Airlie <airlied@redhat.com>
drivers/gpu/drm/drm_sysfs.c
drivers/gpu/drm/gma500/cdv_intel_dp.c
drivers/gpu/drm/i915/i915_irq.c
drivers/gpu/drm/i915/i915_sysfs.c
drivers/gpu/drm/i915/intel_dp.c
drivers/gpu/drm/i915/intel_panel.c
drivers/gpu/drm/nouveau/nouveau_backlight.c
drivers/gpu/drm/radeon/atombios_encoders.c
drivers/gpu/drm/radeon/radeon_legacy_encoders.c
include/drm/drmP.h
include/drm/drm_crtc.h