All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Christian König" <christian.koenig@amd.com>
To: Alex Deucher <alexdeucher@gmail.com>,
	Dan Carpenter <dan.carpenter@oracle.com>
Cc: Alex Deucher <alexander.deucher@amd.com>,
	kernel-janitors@vger.kernel.org,
	Maling list - DRI developers <dri-devel@lists.freedesktop.org>
Subject: Re: [patch] drm/radeon: add a check for allocation failure
Date: Thu, 07 Aug 2014 15:33:55 +0000	[thread overview]
Message-ID: <53E39C63.1080102@amd.com> (raw)
In-Reply-To: <CADnq5_Mxw=ZY-7cxj440Df6PG4bFDNBvX=v70i4CR5O-277bJw@mail.gmail.com>

I'm 100% sure that I've fixed that as well with a follow up patch. Looks 
like that one didn't made it into 3.17

Christian.

Am 07.08.2014 um 17:31 schrieb Alex Deucher:
> On Thu, Aug 7, 2014 at 11:27 AM, Dan Carpenter <dan.carpenter@oracle.com> wrote:
>> We can easily return -ENOMEM here if kzalloc() fails.
>>
>> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
>>
>> diff --git a/drivers/gpu/drm/radeon/radeon_vm.c b/drivers/gpu/drm/radeon/radeon_vm.c
>> index ccae4d9..d15d987 100644
>> --- a/drivers/gpu/drm/radeon/radeon_vm.c
>> +++ b/drivers/gpu/drm/radeon/radeon_vm.c
>> @@ -483,6 +483,8 @@ int radeon_vm_bo_set_addr(struct radeon_device *rdev,
>>                          /* add a clone of the bo_va to clear the old address */
>>                          struct radeon_bo_va *tmp;
>>                          tmp = kzalloc(sizeof(struct radeon_bo_va), GFP_KERNEL);
>> +                       if (!tmp)
>> +                               return -ENOMEM;
> We need to drop the lock here too.  I'll apply and fix it up.  Thanks!
>
> Alex
>
>>                          tmp->it.start = bo_va->it.start;
>>                          tmp->it.last = bo_va->it.last;
>>                          tmp->vm = vm;
>> _______________________________________________
>> dri-devel mailing list
>> dri-devel@lists.freedesktop.org
>> http://lists.freedesktop.org/mailman/listinfo/dri-devel


WARNING: multiple messages have this Message-ID (diff)
From: "Christian König" <christian.koenig@amd.com>
To: Alex Deucher <alexdeucher@gmail.com>,
	Dan Carpenter <dan.carpenter@oracle.com>
Cc: Alex Deucher <alexander.deucher@amd.com>,
	kernel-janitors@vger.kernel.org,
	Maling list - DRI developers <dri-devel@lists.freedesktop.org>
Subject: Re: [patch] drm/radeon: add a check for allocation failure
Date: Thu, 7 Aug 2014 17:33:55 +0200	[thread overview]
Message-ID: <53E39C63.1080102@amd.com> (raw)
In-Reply-To: <CADnq5_Mxw=ZY-7cxj440Df6PG4bFDNBvX=v70i4CR5O-277bJw@mail.gmail.com>

I'm 100% sure that I've fixed that as well with a follow up patch. Looks 
like that one didn't made it into 3.17

Christian.

Am 07.08.2014 um 17:31 schrieb Alex Deucher:
> On Thu, Aug 7, 2014 at 11:27 AM, Dan Carpenter <dan.carpenter@oracle.com> wrote:
>> We can easily return -ENOMEM here if kzalloc() fails.
>>
>> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
>>
>> diff --git a/drivers/gpu/drm/radeon/radeon_vm.c b/drivers/gpu/drm/radeon/radeon_vm.c
>> index ccae4d9..d15d987 100644
>> --- a/drivers/gpu/drm/radeon/radeon_vm.c
>> +++ b/drivers/gpu/drm/radeon/radeon_vm.c
>> @@ -483,6 +483,8 @@ int radeon_vm_bo_set_addr(struct radeon_device *rdev,
>>                          /* add a clone of the bo_va to clear the old address */
>>                          struct radeon_bo_va *tmp;
>>                          tmp = kzalloc(sizeof(struct radeon_bo_va), GFP_KERNEL);
>> +                       if (!tmp)
>> +                               return -ENOMEM;
> We need to drop the lock here too.  I'll apply and fix it up.  Thanks!
>
> Alex
>
>>                          tmp->it.start = bo_va->it.start;
>>                          tmp->it.last = bo_va->it.last;
>>                          tmp->vm = vm;
>> _______________________________________________
>> dri-devel mailing list
>> dri-devel@lists.freedesktop.org
>> http://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2014-08-07 15:33 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-07 15:27 [patch] drm/radeon: add a check for allocation failure Dan Carpenter
2014-08-07 15:27 ` Dan Carpenter
2014-08-07 15:31 ` Alex Deucher
2014-08-07 15:31   ` Alex Deucher
2014-08-07 15:33   ` Christian König [this message]
2014-08-07 15:33     ` Christian König
2014-08-07 15:56   ` Dan Carpenter
2014-08-07 15:56     ` Dan Carpenter

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=53E39C63.1080102@amd.com \
    --to=christian.koenig@amd.com \
    --cc=alexander.deucher@amd.com \
    --cc=alexdeucher@gmail.com \
    --cc=dan.carpenter@oracle.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=kernel-janitors@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.