dect
/
linux-2.6
Archived
13
0
Fork 0
This repository has been archived on 2022-02-17. You can view files and clone it, but cannot push or open issues or pull requests.
linux-2.6/include/drm
Chris Wilson 39b4d07aa3 drm: Hold the mutex when dropping the last GEM reference (v2)
In order to be fully threadsafe we need to check that the drm_gem_object
refcount is still 0 after acquiring the mutex in order to call the free
function. Otherwise, we may encounter scenarios like:

Thread A:                                        Thread B:
drm_gem_close
unreference_unlocked
kref_put                                         mutex_lock
...                                              i915_gem_evict
...                                              kref_get -> BUG
...                                              i915_gem_unbind
...                                              kref_put
...                                              i915_gem_object_free
...                                              mutex_unlock
mutex_lock
i915_gem_object_free -> BUG
i915_gem_object_unbind
kfree
mutex_unlock

Note that no driver is currently using the free_unlocked vfunc and it is
scheduled for removal, hasten that process.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=30454
Reported-and-Tested-by: Magnus Kessler <Magnus.Kessler@gmx.net>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: stable@kernel.org
Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-10-01 21:08:45 +10:00
..
i2c drm: Import driver for the sil164 I2C TMDS transmitter. 2010-08-02 10:21:13 +10:00
ttm drm: move ttm global code to core drm 2010-08-04 09:46:06 +10:00
Kbuild include: replace unifdef-y with header-y 2010-08-14 22:26:51 +02:00
drm.h drm: move ttm global code to core drm 2010-08-04 09:46:06 +10:00
drmP.h drm: Hold the mutex when dropping the last GEM reference (v2) 2010-10-01 21:08:45 +10:00
drm_buffer.h drm: Add generic multipart buffer. 2010-02-23 09:46:20 +10:00
drm_cache.h drm/ttm: consolidate cache flushing code in one place. 2009-08-27 09:53:47 +10:00
drm_core.h drm: Fix support for PCI domains 2010-08-10 08:20:20 +10:00
drm_crtc.h drm: Use a nondestructive mode for output detect when polling (v2) 2010-09-14 20:38:48 +10:00
drm_crtc_helper.h Merge branch 'drm-core-next' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6 2010-08-05 16:02:01 -07:00
drm_dp_helper.h drm/radeon/kms: add support for DP modesetting 2009-12-08 10:22:44 +10:00
drm_edid.h drm/edid: Add detailed block walk for CEA extensions 2010-08-10 10:46:57 +10:00
drm_encoder_slave.h drm/kms: no need to return void value (encoder) 2009-08-19 16:06:49 +10:00
drm_fb_helper.h drm: add KGDB/KDB support 2010-08-05 09:22:31 -05:00
drm_fixed.h drm: move radeon_fixed.h to shared drm_fixed.h header 2010-05-18 18:21:33 +10:00
drm_global.h drm: move ttm global code to core drm 2010-08-04 09:46:06 +10:00
drm_hashtab.h drm: include kernel list header file in hashtab header 2009-06-12 15:56:34 +10:00
drm_mem_util.h drm/ttm: use drm calloc large and free large 2010-03-15 10:31:43 +10:00
drm_memory.h includecheck fix: include/drm, drm_memory.h 2009-09-20 16:02:58 +05:30
drm_mm.h drm: implement helper functions for scanning lru list 2010-07-07 12:29:51 +10:00
drm_mode.h drm: add "auto" dithering method 2010-07-21 11:19:45 +10:00
drm_os_linux.h drm/i915: add i915_lp_ring_sync helper 2009-11-05 14:47:07 -08:00
drm_pciids.h drm/radeon: fix PCI ID 5657 to be an RV410 2010-09-27 09:21:28 +10:00
drm_sarea.h drm: move to kref per-master structures. 2008-12-29 17:47:22 +10:00
drm_sman.h drm: reorganise drm tree to be more future proof. 2008-07-14 10:45:01 +10:00
drm_sysfs.h drm: Enable drm drivers to add drm sysfs devices. 2009-08-19 16:08:51 +10:00
i810_drm.h drm: reorganise drm tree to be more future proof. 2008-07-14 10:45:01 +10:00
i830_drm.h drm: block userspace under allocating buffer and having drivers overwrite it (v2) 2010-08-17 14:52:25 +10:00
i915_drm.h Merge branch 'drm-core-next' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6 2010-08-23 18:28:03 -07:00
mga_drm.h drm: block userspace under allocating buffer and having drivers overwrite it (v2) 2010-08-17 14:52:25 +10:00
nouveau_drm.h drm: block userspace under allocating buffer and having drivers overwrite it (v2) 2010-08-17 14:52:25 +10:00
r128_drm.h drm: reorganise drm tree to be more future proof. 2008-07-14 10:45:01 +10:00
radeon_drm.h drm: block userspace under allocating buffer and having drivers overwrite it (v2) 2010-08-17 14:52:25 +10:00
savage_drm.h drm: block userspace under allocating buffer and having drivers overwrite it (v2) 2010-08-17 14:52:25 +10:00
sis_drm.h drm: reorganise drm tree to be more future proof. 2008-07-14 10:45:01 +10:00
via_drm.h drm: Add compatibility #ifdefs for *BSD 2009-12-04 08:59:28 +10:00
vmwgfx_drm.h drm/vmwgfx: Allow userspace to change default layout. Bump minor. 2010-06-03 13:13:36 +10:00