From: "Christian König" <christian.koenig@amd.com>
To: "Deucher, Alexander" <Alexander.Deucher@amd.com>,
Quentin Casasnovas <quentin.casasnovas@oracle.com>,
David Airlie <airlied@linux.ie>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"stable@vger.kernel.org" <stable@vger.kernel.org>
Subject: Re: [PATCH] drm/radeon: memory leak on bo reservation failure.
Date: Tue, 15 Apr 2014 11:33:35 +0200 [thread overview]
Message-ID: <534CFCEF.1050403@amd.com> (raw)
In-Reply-To: <A3397C8B8B789E45844E7EC5DEAD89D03ECB1956@satlexdag05.amd.com>
Am 14.04.2014 23:43, schrieb Deucher, Alexander:
>> -----Original Message-----
>> From: Quentin Casasnovas [mailto:quentin.casasnovas@oracle.com]
>> Sent: Tuesday, March 18, 2014 12:17 PM
>> To: David Airlie
>> Cc: linux-kernel@vger.kernel.org; Quentin Casasnovas;
>> stable@vger.kernel.org; Koenig, Christian; Deucher, Alexander
>> Subject: [PATCH] drm/radeon: memory leak on bo reservation failure.
>>
>> 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>
> Sorry I missed this. It looks like we probably want an updated version for newer kernels where radeon_vm_init() can fail as well.
I've rebased the stuff and added the missing free on vm failure as well.
Patch is on the list and in my 3.15 queue.
Christian.
>
> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
>
> Alex
>
>> ---
>> 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
>>
prev parent reply other threads:[~2014-04-15 9:47 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
2014-04-14 21:43 ` Deucher, Alexander
2014-04-15 9:33 ` Christian König [this message]
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=534CFCEF.1050403@amd.com \
--to=christian.koenig@amd.com \
--cc=Alexander.Deucher@amd.com \
--cc=airlied@linux.ie \
--cc=linux-kernel@vger.kernel.org \
--cc=quentin.casasnovas@oracle.com \
--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