[4.2.y-ckt stable] Patch "drm/amdgpu: set metadata pointer to NULL after freeing." has been added to the 4.2.y-ckt tree
Kamal Mostafa
kamal at canonical.com
Mon May 9 19:43:58 UTC 2016
This is a note to let you know that I have just added a patch titled
drm/amdgpu: set metadata pointer to NULL after freeing.
to the linux-4.2.y-queue branch of the 4.2.y-ckt extended stable tree
which can be found at:
https://git.launchpad.net/~canonical-kernel/linux/+git/linux-stable-ckt/log/?h=linux-4.2.y-queue
This patch is scheduled to be released in version 4.2.8-ckt10.
If you, or anyone else, feels it should not be added to this tree, please
reply to this email.
For more information about the 4.2.y-ckt tree, see
https://wiki.ubuntu.com/Kernel/Dev/ExtendedStable
Thanks.
-Kamal
---8<------------------------------------------------------------
>From fe4c8611d095538f9c888fd1f77fa1d3c4c647c9 Mon Sep 17 00:00:00 2001
From: Dave Airlie <airlied at redhat.com>
Date: Tue, 3 May 2016 12:44:29 +1000
Subject: drm/amdgpu: set metadata pointer to NULL after freeing.
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
commit 0092d3edcb23fcdb8cbe4159ba94a534290ff982 upstream.
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.
Reviewed-by: Christian König <christian.koenig at amd.com>
Signed-off-by: Dave Airlie <airlied at redhat.com>
Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
Signed-off-by: Kamal Mostafa <kamal at canonical.com>
---
drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
index da3f9f2..870cb79 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
@@ -550,6 +550,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;
--
2.7.4
More information about the kernel-team
mailing list