diff options
author | Rob Clark <robdclark@gmail.com> | 2016-05-24 18:43:26 -0400 |
---|---|---|
committer | Rob Clark <robdclark@gmail.com> | 2016-06-04 14:45:49 -0400 |
commit | ba344afd667a6f1c6bf7c53e08fc16bd84fa4df7 (patch) | |
tree | 8569e3070bfa246bf9a81d59e27878f4aabafaea /drivers/gpu | |
parent | 69a834c28fb514403eb91a4f0120da214a52e056 (diff) |
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: Rob Clark <robdclark@gmail.com>
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/drm/msm/msm_gem_submit.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/gpu/drm/msm/msm_gem_submit.c b/drivers/gpu/drm/msm/msm_gem_submit.c index b89ca5174863..635eff17c3d1 100644 --- a/drivers/gpu/drm/msm/msm_gem_submit.c +++ b/drivers/gpu/drm/msm/msm_gem_submit.c @@ -40,12 +40,14 @@ static struct msm_gem_submit *submit_create(struct drm_device *dev, submit->dev = dev; submit->gpu = gpu; + submit->fence = NULL; submit->pid = get_pid(task_pid(current)); /* initially, until copy_from_user() and bo lookup succeeds: */ submit->nr_bos = 0; submit->nr_cmds = 0; + INIT_LIST_HEAD(&submit->node); INIT_LIST_HEAD(&submit->bo_list); ww_acquire_init(&submit->ticket, &reservation_ww_class); |