Skip to content

Commit

Permalink
drm/vmwgfx: fix a NULL dereference
Browse files Browse the repository at this point in the history
We dereference "eaction->event" inside the call to drm_send_event_locked()
so should hold off on setting it to NULL until afterward.

Fixes: fb740cf ("drm: Create drm_send_event helpers")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20160128090646.GA5824@mwanda
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
  • Loading branch information
Dan Carpenter authored and Daniel Vetter committed Jan 28, 2016
1 parent 09859d2 commit 15b6b80
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/gpu/drm/vmwgfx/vmwgfx_fence.c
Original file line number Diff line number Diff line change
Expand Up @@ -880,8 +880,8 @@ static void vmw_event_fence_action_seq_passed(struct vmw_fence_action *action)
}

list_del_init(&eaction->fpriv_head);
eaction->event = NULL;
drm_send_event_locked(dev, eaction->event);
eaction->event = NULL;
spin_unlock_irqrestore(&dev->event_lock, irq_flags);
}

Expand Down

0 comments on commit 15b6b80

Please sign in to comment.