Commit 15b6b804 authored by Dan Carpenter's avatar Dan Carpenter Committed by Daniel Vetter

drm/vmwgfx: fix a NULL dereference

We dereference "eaction->event" inside the call to drm_send_event_locked()
so should hold off on setting it to NULL until afterward.

Fixes: fb740cf2 ("drm: Create drm_send_event helpers")
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20160128090646.GA5824@mwandaSigned-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
parent 09859d2a
......@@ -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);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment