[3.8.y.z extended stable] Patch "drm/radeon: memory leak on bo reservation failure. v2" has been added to staging queue
Kamal Mostafa
kamal at canonical.com
Thu Jun 12 22:25:12 UTC 2014
This is a note to let you know that I have just added a patch titled
drm/radeon: memory leak on bo reservation failure. v2
to the linux-3.8.y-queue branch of the 3.8.y.z extended stable tree
which can be found at:
http://kernel.ubuntu.com/git?p=ubuntu/linux.git;a=shortlog;h=refs/heads/linux-3.8.y-queue
This patch is scheduled to be released in version 3.8.13.24.
If you, or anyone else, feels it should not be added to this tree, please
reply to this email.
For more information about the 3.8.y.z tree, see
https://wiki.ubuntu.com/Kernel/Dev/ExtendedStable
Thanks.
-Kamal
------
>From 2b9149f17e7135c31c9df1c80ab6d912c4265126 Mon Sep 17 00:00:00 2001
From: Quentin Casasnovas <quentin.casasnovas at oracle.com>
Date: Tue, 18 Mar 2014 17:16:52 +0100
Subject: drm/radeon: memory leak on bo reservation failure. v2
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
commit 74073c9dd29905645feb6dee03c144657a9844cd upstream.
On bo reservation failure, we end up leaking fpriv.
v2 (chk): rebased and added missing free on vm failure as well
Fixes: 5e386b574cf7e1 ("drm/radeon: fix missing bo reservation")
Cc: Christian König <christian.koenig at amd.com>
Cc: Alex Deucher <alexander.deucher at amd.com>
Signed-off-by: Quentin Casasnovas <quentin.casasnovas at oracle.com>
Signed-off-by: Christian König <christian.koenig at amd.com>
[ kamal: backport to 3.13-stable: omit radeon_vm_init() return check ]
Signed-off-by: Kamal Mostafa <kamal at canonical.com>
---
drivers/gpu/drm/radeon/radeon_kms.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/radeon/radeon_kms.c b/drivers/gpu/drm/radeon/radeon_kms.c
index 89c85e0..32a5dae 100644
--- a/drivers/gpu/drm/radeon/radeon_kms.c
+++ b/drivers/gpu/drm/radeon/radeon_kms.c
@@ -460,8 +460,11 @@ int radeon_driver_open_kms(struct drm_device *dev, struct drm_file *file_priv)
radeon_vm_init(rdev, &fpriv->vm);
r = radeon_bo_reserve(rdev->ring_tmp_bo.bo, false);
- if (r)
+ if (r) {
+ radeon_vm_fini(rdev, &fpriv->vm);
+ kfree(fpriv);
return r;
+ }
/* map the ib pool buffer read only into
* virtual address space */
--
1.9.1
More information about the kernel-team
mailing list