summary refs log tree commit diff
path: root/drivers/gpu/drm/i2c
diff options
context:
space:
mode:
authorVille Syrjälä <ville.syrjala@linux.intel.com>2014-08-06 14:49:52 +0300
committerDaniel Vetter <daniel.vetter@ffwll.ch>2014-08-06 22:39:27 +0200
commitffe7c73a8d4f0caeebd5d220ddbf7126a4daca1f (patch)
treed232fbd70fd400e9cf4c73a22f0eb717eea20deb /drivers/gpu/drm/i2c
parent56cc279b29c7b204fe7d0943509ae209b8b128db (diff)
downloadlinux-ffe7c73a8d4f0caeebd5d220ddbf7126a4daca1f.tar.gz
drm: Fix race between drm_vblank_off() and drm_queue_vblank_event()
Currently it's possible that the following will happen:
1. drm_wait_vblank() calls drm_vblank_get()
2. drm_vblank_off() gets called
3. drm_wait_vblank() calls drm_queue_vblank_event() which
   adds the event to the queue event though vblank interrupts
   are currently disabled (and may not be re-enabled ever again).

To fix the problem, add another vblank->enabled check into
drm_queue_vblank_event().

drm_vblank_off() holds event_lock around the vblank disable,
so no further locking needs to be added to drm_queue_vblank_event().
vblank disable from another source is not possible since
drm_wait_vblank() already holds a vblank reference.

Reviewed-by: Matt Roper <matthew.d.roper@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/i2c')
0 files changed, 0 insertions, 0 deletions