lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <c7741be3-43ec-307b-f5bd-3d19725df76c@amd.com>
Date:   Wed, 17 Nov 2021 08:27:00 +0100
From:   Christian König <christian.koenig@....com>
To:     Amit Pundir <amit.pundir@...aro.org>,
        Rob Clark <robdclark@...il.com>
Cc:     dri-devel@...ts.freedesktop.org, Daniel Vetter <daniel@...ll.ch>,
        linux-arm-msm@...r.kernel.org, Rob Clark <robdclark@...omium.org>,
        Andrey Grodzovsky <andrey.grodzovsky@....com>,
        David Airlie <airlied@...ux.ie>,
        open list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] drm/scheduler: fix
 drm_sched_job_add_implicit_dependencies harder

Am 16.11.21 um 19:30 schrieb Amit Pundir:
> On Tue, 16 Nov 2021 at 21:21, Rob Clark <robdclark@...il.com> wrote:
>> From: Rob Clark <robdclark@...omium.org>
>>
>> drm_sched_job_add_dependency() could drop the last ref, so we need to do
>> the dma_fence_get() first.
>>
> It fixed the splats I saw on RB5 (sm8250 | A650). Thanks.
>
> Tested-by: Amit Pundir <amit.pundir@...aro.org>

I've added my rb, pushed this with the original fix to drm-misc-fixes 
and cleaned up the obvious fallout between drm-misc-fixes and 
drm-misc-next in drm-tip.

Thanks for the help and sorry for the noise,
Christian.

>
>> Cc: Christian König <christian.koenig@....com>
>> Fixes: 9c2ba265352a drm/scheduler: ("use new iterator in drm_sched_job_add_implicit_dependencies v2")
>> Signed-off-by: Rob Clark <robdclark@...omium.org>
>> ---
>> Applies on top of "drm/scheduler: fix drm_sched_job_add_implicit_dependencies"
>> but I don't think that has a stable commit sha yet.
>>
>>   drivers/gpu/drm/scheduler/sched_main.c | 9 +++++----
>>   1 file changed, 5 insertions(+), 4 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/scheduler/sched_main.c b/drivers/gpu/drm/scheduler/sched_main.c
>> index 94fe51b3caa2..f91fb31ab7a7 100644
>> --- a/drivers/gpu/drm/scheduler/sched_main.c
>> +++ b/drivers/gpu/drm/scheduler/sched_main.c
>> @@ -704,12 +704,13 @@ int drm_sched_job_add_implicit_dependencies(struct drm_sched_job *job,
>>          int ret;
>>
>>          dma_resv_for_each_fence(&cursor, obj->resv, write, fence) {
>> -               ret = drm_sched_job_add_dependency(job, fence);
>> -               if (ret)
>> -                       return ret;
>> -
>>                  /* Make sure to grab an additional ref on the added fence */
>>                  dma_fence_get(fence);
>> +               ret = drm_sched_job_add_dependency(job, fence);
>> +               if (ret) {
>> +                       dma_fence_put(fence);
>> +                       return ret;
>> +               }
>>          }
>>          return 0;
>>   }
>> --
>> 2.33.1
>>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ