linux/drivers/gpu/drm/i915
Daniel Vetter d861e33876 drm/i915: fix reference counting in i915_gem_create
This function is called without the dev->struct_mutex held, hence we
need to use the _unlocked unreference variants.

As soon as the object is registered userspace can sneak in here with a
gem_close ioctl call, so the object can (and with my new evil tests
actually does) get the final unreference in this place. The lack of
locking then results in hilarity and some good leakage.

To fix this we simply need to revert

Chris Wilson <chris@chris-wilson.co.uk>

v2: We need to make the trace call _before_ we drop our ref - the
object might very well be gone by then already.

v3: Just revert the original patch as suggested by Chris Wilson.

Cc: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
[danvet: Remove the added white line again to tighten the return
block, requested by Chris.]
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-07-24 23:25:03 +02:00
..
dvo_ch7xxx.c drm/i915: add support for dvo Chrontel 7010B 2013-05-20 22:02:49 +02:00
dvo_ch7017.c
dvo_ivch.c
dvo_ns2501.c
dvo_sil164.c
dvo_tfp410.c
dvo.h
i915_debugfs.c drm/intel: add enable_psr module option and disable psr by default 2013-07-18 10:17:36 +02:00
i915_dma.c drm/i915: Create a global list of vms 2013-07-17 22:24:00 +02:00
i915_drv.c drm/i915: add prefault_disable module option 2013-07-19 09:29:26 +02:00
i915_drv.h drm/i915: add prefault_disable module option 2013-07-19 09:29:26 +02:00
i915_gem_context.c drm/i915: Fix retrieval of hangcheck stats 2013-07-16 10:40:25 +02:00
i915_gem_debug.c drm/i915: Move active/inactive lists to new mm 2013-07-17 22:24:32 +02:00
i915_gem_dmabuf.c drm/i915: fix dmabuf vmap support 2013-05-01 16:09:31 +10:00
i915_gem_evict.c drm/i915: Create VMAs 2013-07-18 08:46:13 +02:00
i915_gem_execbuffer.c drm/i915: add prefault_disable module option 2013-07-19 09:29:26 +02:00
i915_gem_gtt.c drm/i915: Create VMAs 2013-07-18 08:46:13 +02:00
i915_gem_stolen.c drm/i915: Use Graphics Base of Stolen Memory on all gen3+ 2013-07-24 10:37:11 +02:00
i915_gem_tiling.c drm/i915: Getter/setter for object attributes 2013-07-08 22:04:34 +02:00
i915_gem.c drm/i915: fix reference counting in i915_gem_create 2013-07-24 23:25:03 +02:00
i915_gpu_error.c drm/i915: Move active/inactive lists to new mm 2013-07-17 22:24:32 +02:00
i915_ioc32.c
i915_irq.c drm/i915: invert {ilk, snb}_gt_irq_handler check 2013-07-20 10:49:03 +02:00
i915_reg.h drm/i915: add functions to disable and restore LCPLL 2013-07-24 10:37:10 +02:00
i915_suspend.c drm/i915: protect backlight registers and data with a spinlock 2013-04-25 14:10:10 +02:00
i915_sysfs.c drm/i915: add error_state sysfs entry 2013-07-01 19:39:31 +02:00
i915_trace_points.c
i915_trace.h drm/i915: Getter/setter for object attributes 2013-07-08 22:04:34 +02:00
i915_ums.c drm/i915: scrap register address storage 2013-06-10 19:54:14 +02:00
intel_acpi.c
intel_bios.c drm/i915: Organize VBT stuff inside drm_i915_private 2013-05-10 21:56:46 +02:00
intel_bios.h drm/i915: set CPT FDI RX polarity bits based on VBT 2013-04-18 09:43:31 +02:00
intel_crt.c drm/i915: Add some debug breadcrumbs to connector detection 2013-07-24 10:37:07 +02:00
intel_ddi.c drm/i915: Hook PSR functionality 2013-07-18 10:34:54 +02:00
intel_display.c drm/i915: add functions to disable and restore LCPLL 2013-07-24 10:37:10 +02:00
intel_dp.c drm/i915: Add some debug breadcrumbs to connector detection 2013-07-24 10:37:07 +02:00
intel_drv.h drm/i915: add functions to disable and restore LCPLL 2013-07-24 10:37:10 +02:00
intel_dvo.c drm/i915: Add some debug breadcrumbs to connector detection 2013-07-24 10:37:07 +02:00
intel_fb.c drm/i915: Getter/setter for object attributes 2013-07-08 22:04:34 +02:00
intel_hdmi.c drm/i915: Add some debug breadcrumbs to connector detection 2013-07-24 10:37:07 +02:00
intel_i2c.c drm/i915: avoid premature DP AUX timeouts 2013-05-22 13:51:26 +02:00
intel_lvds.c drm/i915: Add some debug breadcrumbs to connector detection 2013-07-24 10:37:07 +02:00
intel_modes.c drm/i915: Add "Automatic" mode for the "Broadcast RGB" property 2013-01-20 13:09:44 +01:00
intel_opregion.c drm/i915: tune down DIDL warning about too many outputs 2013-07-01 11:14:42 +02:00
intel_overlay.c drm/i915: disable stolen mem for OVERLAY_NEEDS_PHYSICAL 2013-07-24 10:37:11 +02:00
intel_panel.c drm/i915: Fix WARN_ON() on UP machines 2013-05-23 12:51:30 +02:00
intel_pm.c drm/i915: Don't try to calculate RC6 residency on GEN4 and before 2013-07-16 10:33:22 +02:00
intel_ringbuffer.c drm/i915: don't enable PM_VEBOX_CS_ERROR_INTERRUPT 2013-07-11 14:37:00 +02:00
intel_ringbuffer.h drm/i915: unify ring irq refcounts (again) 2013-07-11 14:36:49 +02:00
intel_sdvo_regs.h
intel_sdvo.c drm/i915: Add some debug breadcrumbs to connector detection 2013-07-24 10:37:07 +02:00
intel_sideband.c drm/i915: change VLV IOSF sideband accessors to not return error code 2013-05-23 23:25:42 +02:00
intel_sprite.c drm/i915: Getter/setter for object attributes 2013-07-08 22:04:34 +02:00
intel_tv.c drm/i915: Add some debug breadcrumbs to connector detection 2013-07-24 10:37:07 +02:00
Makefile drm/i915: move error state to own compilation unit 2013-07-12 18:53:13 +02:00