[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20140408073556.GA15513@chrystal.home>
Date: Tue, 8 Apr 2014 09:36:24 +0200
From: Quentin Casasnovas <quentin.casasnovas@...cle.com>
To: David Airlie <airlied@...ux.ie>
Cc: linux-kernel@...r.kernel.org, stable@...r.kernel.org,
Christian König <christian.koenig@....com>,
Alex Deucher <alexander.deucher@....com>,
Quentin Casasnovas <quentin.casasnovas@...cle.com>
Subject: Re: [PATCH] drm/radeon: memory leak on bo reservation failure.
Ping Dave?
On Tue, Mar 18, 2014 at 05:16:52PM +0100, Quentin Casasnovas wrote:
> On bo reservation failure, we end up leaking fpriv.
>
> 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>
> ---
> 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 66ed3ea..51cda80 100644
> --- a/drivers/gpu/drm/radeon/radeon_kms.c
> +++ b/drivers/gpu/drm/radeon/radeon_kms.c
> @@ -546,8 +546,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.8.3.2
>
--
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