Commit ba344afd authored by Rob Clark's avatar Rob Clark

drm/msm: fix some crashes in submit fail path

If submit fails, before fence is created or before submit is added to
submit-list, then unitialized fields cause problems in the clean-up
path.
Signed-off-by: default avatarRob Clark <robdclark@gmail.com>
parent 69a834c2
...@@ -40,12 +40,14 @@ static struct msm_gem_submit *submit_create(struct drm_device *dev, ...@@ -40,12 +40,14 @@ static struct msm_gem_submit *submit_create(struct drm_device *dev,
submit->dev = dev; submit->dev = dev;
submit->gpu = gpu; submit->gpu = gpu;
submit->fence = NULL;
submit->pid = get_pid(task_pid(current)); submit->pid = get_pid(task_pid(current));
/* initially, until copy_from_user() and bo lookup succeeds: */ /* initially, until copy_from_user() and bo lookup succeeds: */
submit->nr_bos = 0; submit->nr_bos = 0;
submit->nr_cmds = 0; submit->nr_cmds = 0;
INIT_LIST_HEAD(&submit->node);
INIT_LIST_HEAD(&submit->bo_list); INIT_LIST_HEAD(&submit->bo_list);
ww_acquire_init(&submit->ticket, &reservation_ww_class); ww_acquire_init(&submit->ticket, &reservation_ww_class);
......
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