From: Quentin Casasnovas <quentin.casasnovas@oracle.com>
To: David Airlie <airlied@linux.ie>
Cc: linux-kernel@vger.kernel.org, stable@vger.kernel.org,
"Christian König" <christian.koenig@amd.com>,
"Alex Deucher" <alexander.deucher@amd.com>,
"Quentin Casasnovas" <quentin.casasnovas@oracle.com>
Subject: Re: [PATCH] drm/radeon: memory leak on bo reservation failure.
Date: Tue, 8 Apr 2014 09:36:24 +0200 [thread overview]
Message-ID: <20140408073556.GA15513@chrystal.home> (raw)
In-Reply-To: <1395159412-12377-1-git-send-email-quentin.casasnovas@oracle.com>
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@vger.kernel.org
> Cc: Christian König <christian.koenig@amd.com>
> Cc: Alex Deucher <alexander.deucher@amd.com>
> Signed-off-by: Quentin Casasnovas <quentin.casasnovas@oracle.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
>
next prev parent reply other threads:[~2014-04-08 7:36 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-18 16:16 [PATCH] drm/radeon: memory leak on bo reservation failure Quentin Casasnovas
2014-04-08 7:36 ` Quentin Casasnovas [this message]
2014-04-14 21:43 ` Deucher, Alexander
2014-04-15 9:33 ` Christian König
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20140408073556.GA15513@chrystal.home \
--to=quentin.casasnovas@oracle.com \
--cc=airlied@linux.ie \
--cc=alexander.deucher@amd.com \
--cc=christian.koenig@amd.com \
--cc=linux-kernel@vger.kernel.org \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox