diff options
| author | Dave Airlie <[email protected]> | 2016-05-03 02:44:29 +0000 |
|---|---|---|
| committer | Alex Deucher <[email protected]> | 2016-05-03 15:53:44 +0000 |
| commit | 0092d3edcb23fcdb8cbe4159ba94a534290ff982 (patch) | |
| tree | e58d9c93ba27914d0d3c56074c6ce809c2b2db59 /drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | |
| parent | Merge branch 'drm-fixes-4.6' of git://people.freedesktop.org/~agd5f/linux int... (diff) | |
| download | kernel-0092d3edcb23fcdb8cbe4159ba94a534290ff982.tar.gz kernel-0092d3edcb23fcdb8cbe4159ba94a534290ff982.zip | |
drm/amdgpu: set metadata pointer to NULL after freeing.
Without this there was a double free of the metadata,
which ended up freeing the fd table for me here, and taking
out the machine more often than not.
I reproduced with X.org + modesetting DDX + latest llvm/mesa,
also required using dri3.
Cc: [email protected]
Reviewed-by: Christian König <[email protected]>
Signed-off-by: Dave Airlie <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_object.c')
| -rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c index e557fc1f17c8..7ecea83ce453 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c @@ -541,6 +541,7 @@ int amdgpu_bo_set_metadata (struct amdgpu_bo *bo, void *metadata, if (!metadata_size) { if (bo->metadata_size) { kfree(bo->metadata); + bo->metadata = NULL; bo->metadata_size = 0; } return 0; |
