[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <19142a08acf5fae289672ae075d707631fc479ad.1404128998.git.jslaby@suse.cz>
Date: Mon, 30 Jun 2014 13:51:47 +0200
From: Jiri Slaby <jslaby@...e.cz>
To: stable@...r.kernel.org
Cc: linux-kernel@...r.kernel.org,
Quentin Casasnovas <quentin.casasnovas@...cle.com>,
Christian König <christian.koenig@....com>,
Alex Deucher <alexander.deucher@....com>,
Jiri Slaby <jslaby@...e.cz>
Subject: [PATCH 3.12 086/181] drm/radeon: memory leak on bo reservation failure. v2
From: Quentin Casasnovas <quentin.casasnovas@...cle.com>
3.12-stable review patch. If anyone has any objections, please let me know.
===============
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: stable@...r.kernel.org
Cc: Christian König <christian.koenig@....com>
Cc: Alex Deucher <alexander.deucher@....com>
Signed-off-by: Quentin Casasnovas <quentin.casasnovas@...cle.com>
Signed-off-by: Christian König <christian.koenig@....com>
Signed-off-by: Jiri Slaby <jslaby@...e.cz>
Conflicts:
drivers/gpu/drm/radeon/radeon_kms.c
---
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 7456ce186f29..a134e8bf53f5 100644
--- a/drivers/gpu/drm/radeon/radeon_kms.c
+++ b/drivers/gpu/drm/radeon/radeon_kms.c
@@ -501,8 +501,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 */
--
2.0.0
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists