summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/i2c
diff options
context:
space:
mode:
authorDaniel Vetter <daniel.vetter@ffwll.ch>2013-07-24 21:25:03 (GMT)
committerDaniel Vetter <daniel.vetter@ffwll.ch>2013-07-24 21:25:03 (GMT)
commitd861e3387650296f1fca2a4dd0dcd380c8fdddad (patch)
tree9d5658171f779271e0530ddafc95e5533168bd5f /drivers/gpu/drm/i2c
parent17fec8a08698bcab98788e1e89f5b8e7502ababd (diff)
downloadlinux-fsl-qoriq-d861e3387650296f1fca2a4dd0dcd380c8fdddad.tar.xz
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>
Diffstat (limited to 'drivers/gpu/drm/i2c')
0 files changed, 0 insertions, 0 deletions