diff options
author | Dave Airlie <airlied@redhat.com> | 2017-03-10 12:13:04 +1000 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2017-03-10 14:27:14 -0500 |
commit | 607523d19c9d67ba4cf7bdaced644f11ed04992c (patch) | |
tree | 588220e79cb0bdd265d9601841cb6cc173d6fe0c /drivers/gpu | |
parent | d8a8ed9758241e138933c67e40db2db2790eca19 (diff) | |
download | linux-stable-607523d19c9d67ba4cf7bdaced644f11ed04992c.tar.gz linux-stable-607523d19c9d67ba4cf7bdaced644f11ed04992c.tar.bz2 linux-stable-607523d19c9d67ba4cf7bdaced644f11ed04992c.zip |
drm/amdgpu: fix parser init error path to avoid crash in parser fini
If we don't reset the chunk info in the error path, the subsequent
fini path will double free.
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c index d2d0f60ff36d..99424cb8020b 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c @@ -240,6 +240,8 @@ free_partial_kdata: for (; i >= 0; i--) drm_free_large(p->chunks[i].kdata); kfree(p->chunks); + p->chunks = NULL; + p->nchunks = 0; put_ctx: amdgpu_ctx_put(p->ctx); free_chunk: |