Skip to content

Commit

Permalink
drm: Delete the vblank timer synchronously at cleanup time
Browse files Browse the repository at this point in the history
A race condition exists in drm_vblank_cleanup() if the vblank disable
timer callback runs after freeing the memory that its callback function
tries to access. Fix this by deleting the timer synchronously.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
  • Loading branch information
Laurent Pinchart authored and Dave Airlie committed May 22, 2012
1 parent af437cf commit 7eb3b2c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/gpu/drm/drm_irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ void drm_vblank_cleanup(struct drm_device *dev)
if (dev->num_crtcs == 0)
return;

del_timer(&dev->vblank_disable_timer);
del_timer_sync(&dev->vblank_disable_timer);

vblank_disable_fn((unsigned long)dev);

Expand Down

0 comments on commit 7eb3b2c

Please sign in to comment.