Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1719498
| Path | csiph.com!aioe.org!bofh.it!news.nic.it!robomod |
|---|---|
| From | Alex Deucher <alexdeucher@gmail.com> |
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] drm/amdgpu: check memory allocation failure |
| Date | Thu, 24 Aug 2017 20:30:03 +0200 |
| Message-ID | <ui53d-1DE-15@gated-at.bofh.it> (permalink) |
| References | <uhx1w-5kg-13@gated-at.bofh.it> <ui53d-1DE-17@gated-at.bofh.it> |
| X-Original-To | Christian König <christian.koenig@amd.com> |
| Dkim-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=Aa6vJco5lC69/xJW6DohWDK467etbOfE1NqRJrxAMgc=; b=lyc8BqFQer0pQG1f+7VL56eAfzB7I5kMMBmfWcjuWpKoLe3wjjI6yLtu8ZdjGC/ymD GVse/wz/edbmVI9NtHWKynHm5q4jK7cFXNVpd9y331I/jUCWpVFqS5oaslLfiyp0QQ9O c9i+2+FFbJJk+ONwITKV2K6G9dMcb44NsRPfDdbDx9W124UZUqV5Yey9+sjrtEuomsPp UAH01OEkYkOXv9K6WKce2MdREsfalWVaq3Dvlp9kUsX3NMv5E3Q+0+HwPP7yqvqZg1h3 kiDqGsOWrAfy62MJZ0cLjG3lhY368abQ/GLDFTbJulAKpnDniZhUnCWoVfQy7n3hyaEI HIPQ== |
| X-Google-Dkim-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=Aa6vJco5lC69/xJW6DohWDK467etbOfE1NqRJrxAMgc=; b=cwi7F/1coX9e/lwDlzix+JBorMZmcu3aEf2Yrl5LXQgo8jFQDNXEpJKdCs4F/fJfNP PUtl7z69jXox3MnCgfl7wmoJQoT1T4KC2vLCmQWISI0KKsF9OxDI1247tXi9JKP2ppG7 kw+HQKxoJeVkJdnSSxe4K71hD9jzMnjvywyPs8W9y63MLkI2mW/2x4NMqOs5Zw5eLtWZ pnLE3IlHQ02jH4l057k2aAJvt6/nM86Jmk8AjH5L+tYjLNb6q6g9492CHMoHxJSu6aOY ljIyP/phSmDQJqwaO0MMsvp2o6r3tPd4DSlSS7hDDWpixiUEC5q3uDo53ZXzT+Julzzj m/uA== |
| X-Gm-Message-State | AHYfb5gVKfgRsmacGaq+wGTtWBQ2HwZt76Vuw/STy4o2nBIx2NxOB4X+ E5ZDK6tHO3mlxTxoGCvNPR5H2P1Fpw== |
| X-Received | by 10.13.227.66 with SMTP id m63mr5707555ywe.88.1503599000378; Thu, 24 Aug 2017 11:23:20 -0700 (PDT) |
| MIME-Version | 1.0 |
| Content-Type | text/plain; charset="UTF-8" |
| Content-Transfer-Encoding | quoted-printable |
| Sender | robomod@news.nic.it |
| List-ID | <linux-kernel.vger.kernel.org> |
| X-Mailing-List | linux-kernel@vger.kernel.org |
| Approved | robomod@news.nic.it |
| Lines | 54 |
| Organization | linux.* mail to news gateway |
| X-Original-Cc | Christophe JAILLET <christophe.jaillet@wanadoo.fr>, "Deucher, Alexander" <alexander.deucher@amd.com>, Dave Airlie <airlied@linux.ie>, "monk.liu" <Monk.Liu@amd.com>, Chunming Zhou <David1.Zhou@amd.com>, Alex Xie <AlexBin.Xie@amd.com>, Junwei Zhang <Jerry.Zhang@amd.com>, Dave Airlie <airlied@redhat.com>, Marek Olšák <marek.olsak@amd.com>, John Brooks <john@fastquake.com>, Andres Rodriguez <andresx7@gmail.com>, Huang Rui <ray.huang@amd.com>, kernel-janitors@vger.kernel.org, Maling list - DRI developers <dri-devel@lists.freedesktop.org>, amd-gfx list <amd-gfx@lists.freedesktop.org>, LKML <linux-kernel@vger.kernel.org> |
| X-Original-Date | Thu, 24 Aug 2017 14:23:19 -0400 |
| X-Original-Message-ID | <CADnq5_NsFdS7dzogNVd=C_z3rCFfisST69gN8kYEWA+-bouhvQ@mail.gmail.com> |
| X-Original-References | <20170823055236.25451-1-christophe.jaillet@wanadoo.fr> <9a4b653f-6445-f8d3-70c9-91ca9b059839@amd.com> |
| X-Original-Sender | linux-kernel-owner@vger.kernel.org |
| Xref | csiph.com linux.kernel:1719498 |
Show key headers only | View raw
On Wed, Aug 23, 2017 at 4:39 AM, Christian König
<christian.koenig@amd.com> wrote:
> Am 23.08.2017 um 07:52 schrieb Christophe JAILLET:
>>
>> Check memory allocation failure and return -ENOMEM in such a case.
>>
>> 'num_post_dep_syncobjs' still has to be set to 0 before the test in order
>> to have it initialized if 'amdgpu_cs_parser_fini()' is called to free
>> resources.
>>
>> The calling graph would be, in such a case!
>> failure in amdgpu_cs_process_syncobj_out_dep()
>> ---> error code returned by amdgpu_cs_dependencies()
>> --> amdgpu_cs_parser_fini() is called
>>
>> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
>
>
> Reviewed-by: Christian König <christian.koenig@amd.com>
Applied. thanks!
Alex
>
>> ---
>> drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 3 +++
>> 1 file changed, 3 insertions(+)
>>
>> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
>> b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
>> index 15d4a28d73bb..baa90df90aea 100644
>> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
>> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
>> @@ -1079,6 +1079,9 @@ static int amdgpu_cs_process_syncobj_out_dep(struct
>> amdgpu_cs_parser *p,
>> GFP_KERNEL);
>> p->num_post_dep_syncobjs = 0;
>> + if (!p->post_dep_syncobjs)
>> + return -ENOMEM;
>> +
>> for (i = 0; i < num_deps; ++i) {
>> p->post_dep_syncobjs[i] = drm_syncobj_find(p->filp,
>> deps[i].handle);
>> if (!p->post_dep_syncobjs[i])
>
>
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH] drm/amdgpu: check memory allocation failure Christophe JAILLET <christophe.jaillet@wanadoo.fr> - 2017-08-23 08:10 +0200 Re: [PATCH] drm/amdgpu: check memory allocation failure Alex Deucher <alexdeucher@gmail.com> - 2017-08-24 20:30 +0200
csiph-web