Re: [PATCH v4] drm/scheduler: Avoid accessing freed bad job.

2020-07-21 Thread Luben Tuikov
Hi Lucas, Thank you for following up on this. Some things have slowed down, given the world pandemic we've been experiencing this year. I've had the design ready and half of it implemented and committed into a branch. Just as per what I wrote earlier this year on this thread. I need to finish th

Re: [PATCH v4] drm/scheduler: Avoid accessing freed bad job.

2020-07-21 Thread Andrey Grodzovsky
Christian, I would want this very much but unfortunately I am on a strict schedule for an internal project currently and hence will not be able to actively participate. I will do my best to answer any questions Luben might have about current implementation. Andrey On 7/21/20 9:39 AM, Christia

Re: [PATCH v4] drm/scheduler: Avoid accessing freed bad job.

2020-07-21 Thread Christian König
Luben had a good idea how to tackle the whole job handling. Andrey/Lucas can you work with Luben to get this cleaned up because there are a lot of requirements on this which not only come from AMD. Thanks, Christian. Am 21.07.20 um 15:36 schrieb Andrey Grodzovsky: Lucas, Luben picked the work

Re: [PATCH v4] drm/scheduler: Avoid accessing freed bad job.

2020-07-21 Thread Andrey Grodzovsky
Lucas, Luben picked the work on this a few month ago as I was diverted to a different project. Luben, can you update Lucas please ? Andrey On 7/21/20 7:03 AM, Lucas Stach wrote: It seems we all dropped the ball on this one. I believe this is still an open issue. Has there been any progress fr

Re: [PATCH v4] drm/scheduler: Avoid accessing freed bad job.

2020-07-21 Thread Lucas Stach
Hi Andrey, Am Mittwoch, den 12.02.2020, 11:33 -0500 schrieb Andrey Grodzovsky: > On 2/11/20 7:53 PM, Luben Tuikov wrote: > > On 2020-02-11 4:27 p.m., Andrey Grodzovsky wrote: > > > On 2/11/20 10:55 AM, Andrey Grodzovsky wrote: > > > > On 2/10/20 4:50 PM, Luben Tuikov wrote: > > > > > Hi Lucas, > >

Re: [PATCH v4] drm/scheduler: Avoid accessing freed bad job.

2020-02-12 Thread Andrey Grodzovsky
On 2/11/20 7:53 PM, Luben Tuikov wrote: On 2020-02-11 4:27 p.m., Andrey Grodzovsky wrote: On 2/11/20 10:55 AM, Andrey Grodzovsky wrote: On 2/10/20 4:50 PM, Luben Tuikov wrote: Hi Lucas, Thank you for bringing awareness of this issue, publicly. As soon as this patch showed up back in Novembe

Re: [PATCH v4] drm/scheduler: Avoid accessing freed bad job.

2020-02-11 Thread Luben Tuikov
On 2020-02-11 4:27 p.m., Andrey Grodzovsky wrote: > > On 2/11/20 10:55 AM, Andrey Grodzovsky wrote: >> On 2/10/20 4:50 PM, Luben Tuikov wrote: >>> Hi Lucas, >>> >>> Thank you for bringing awareness of this issue, publicly. >>> >>> As soon as this patch showed up back in November of 2019, >>> I obj

Re: [PATCH v4] drm/scheduler: Avoid accessing freed bad job.

2020-02-11 Thread Andrey Grodzovsky
On 2/11/20 10:55 AM, Andrey Grodzovsky wrote: On 2/10/20 4:50 PM, Luben Tuikov wrote: Hi Lucas, Thank you for bringing awareness of this issue, publicly. As soon as this patch showed up back in November of 2019, I objected to it, privately. I didn't find this objection in my mail actually

Re: [PATCH v4] drm/scheduler: Avoid accessing freed bad job.

2020-02-11 Thread Andrey Grodzovsky
On 2/10/20 4:50 PM, Luben Tuikov wrote: Hi Lucas, Thank you for bringing awareness of this issue, publicly. As soon as this patch showed up back in November of 2019, I objected to it, privately. I didn't find this objection in my mail actually I suggested to instead use a _list_ to store

Re: [PATCH v4] drm/scheduler: Avoid accessing freed bad job.

2020-02-10 Thread Luben Tuikov
Hi Lucas, Thank you for bringing awareness of this issue, publicly. As soon as this patch showed up back in November of 2019, I objected to it, privately. I suggested to instead use a _list_ to store the "state" of all jobs of the same state. Then, at any time, timeout interrupt or whatever, we

Re: [PATCH v4] drm/scheduler: Avoid accessing freed bad job.

2020-02-10 Thread Andrey Grodzovsky
Lucas - Ping on my question and also I attached this temporary solution for etnaviv to clarify my point. If that something acceptable for now at least i can do the same for v3d where it requires a bit more code changes. Andrey On 2/6/20 10:49 AM, Andrey Grodzovsky wrote: Well a revert would b

Re: [PATCH v4] drm/scheduler: Avoid accessing freed bad job.

2020-02-07 Thread Daniel Vetter
On Thu, Feb 6, 2020 at 3:51 PM Christian König wrote: > > Am 06.02.20 um 15:49 schrieb Alex Deucher: > > On Thu, Feb 6, 2020 at 6:50 AM Christian König > > wrote: > >> Am 06.02.20 um 12:10 schrieb Lucas Stach: > >>> Hi all, > >>> > >>> On Mi, 2020-02-05 at 19:24 +0100, Lucas Stach wrote: > H

Re: [PATCH v4] drm/scheduler: Avoid accessing freed bad job.

2020-02-06 Thread Andrey Grodzovsky
On 2/6/20 9:51 AM, Christian König wrote: Am 06.02.20 um 15:49 schrieb Alex Deucher: On Thu, Feb 6, 2020 at 6:50 AM Christian König wrote: Am 06.02.20 um 12:10 schrieb Lucas Stach: Hi all, On Mi, 2020-02-05 at 19:24 +0100, Lucas Stach wrote: Hi Andrey, This commit breaks all drivers, whic

Re: [PATCH v4] drm/scheduler: Avoid accessing freed bad job.

2020-02-06 Thread Christian König
Am 06.02.20 um 15:49 schrieb Alex Deucher: On Thu, Feb 6, 2020 at 6:50 AM Christian König wrote: Am 06.02.20 um 12:10 schrieb Lucas Stach: Hi all, On Mi, 2020-02-05 at 19:24 +0100, Lucas Stach wrote: Hi Andrey, This commit breaks all drivers, which may bail out of the timeout processing as

Re: [PATCH v4] drm/scheduler: Avoid accessing freed bad job.

2020-02-06 Thread Alex Deucher
On Thu, Feb 6, 2020 at 6:50 AM Christian König wrote: > > Am 06.02.20 um 12:10 schrieb Lucas Stach: > > Hi all, > > > > On Mi, 2020-02-05 at 19:24 +0100, Lucas Stach wrote: > >> Hi Andrey, > >> > >> This commit breaks all drivers, which may bail out of the timeout > >> processing as they wish to e

Re: [PATCH v4] drm/scheduler: Avoid accessing freed bad job.

2020-02-06 Thread Christian König
Am 06.02.20 um 12:10 schrieb Lucas Stach: Hi all, On Mi, 2020-02-05 at 19:24 +0100, Lucas Stach wrote: Hi Andrey, This commit breaks all drivers, which may bail out of the timeout processing as they wish to extend the timeout (etnaviv, v3d). Those drivers currently just return from the timeou

Re: [PATCH v4] drm/scheduler: Avoid accessing freed bad job.

2020-02-06 Thread Lucas Stach
Hi all, On Mi, 2020-02-05 at 19:24 +0100, Lucas Stach wrote: > Hi Andrey, > > This commit breaks all drivers, which may bail out of the timeout > processing as they wish to extend the timeout (etnaviv, v3d). > > Those drivers currently just return from the timeout handler before > calling drm_sc

Re: [PATCH v4] drm/scheduler: Avoid accessing freed bad job.

2020-02-05 Thread Lucas Stach
Hi Andrey, This commit breaks all drivers, which may bail out of the timeout processing as they wish to extend the timeout (etnaviv, v3d). Those drivers currently just return from the timeout handler before calling drm_sched_stop(), which means with this commit applied we are removing the first j

RE: [PATCH v4] drm/scheduler: Avoid accessing freed bad job.

2019-12-03 Thread Deng, Emily
, Christian ; steven.pr...@arm.com Subject: Re: [PATCH v4] drm/scheduler: Avoid accessing freed bad job. Turns out Steven's patch was already in so i just cherry-picked the change from drm-next-misc Emily - it's in. Andrey On 12/3/19 2:59 PM, Deucher, Alexander wrote: [AMD Officia

Re: [PATCH v4] drm/scheduler: Avoid accessing freed bad job.

2019-12-03 Thread Andrey Grodzovsky
esktop.org ; Koenig, Christian ; steven.pr...@arm.com *Subject:* Re: [PATCH v4] drm/scheduler: Avoid accessing freed bad job. I don't think i can apply this patch 'as is' as this has dependency on patch by Steven which also wasn't applied yet - 588b982 Steven Price    6 wee

Re: [PATCH v4] drm/scheduler: Avoid accessing freed bad job.

2019-12-03 Thread Deucher, Alexander
Cc: dri-devel@lists.freedesktop.org ; amd-...@lists.freedesktop.org ; Koenig, Christian ; steven.pr...@arm.com Subject: Re: [PATCH v4] drm/scheduler: Avoid accessing freed bad job. I don't think i can apply this patch 'as is' as this has dependency on patch by Steven wh

Re: [PATCH v4] drm/scheduler: Avoid accessing freed bad job.

2019-12-03 Thread Andrey Grodzovsky
o:* Deng, Emily ; Deucher, Alexander *Cc:* dri-devel@lists.freedesktop.org ; amd-...@lists.freedesktop.org ; Koenig, Christian ; steven.pr...@arm.com *Subject:* Re: [PATCH v4] drm/scheduler: Avoid accessing freed bad job. Yes - Christian just pushed it to drm-next-misc - I guess Alex/Christian didn&

RE: [PATCH v4] drm/scheduler: Avoid accessing freed bad job.

2019-12-03 Thread Deng, Emily
eedesktop.org; amd-...@lists.freedesktop.org; Koenig, >Christian ; steven.pr...@arm.com >Subject: Re: [PATCH v4] drm/scheduler: Avoid accessing freed bad job. > >Yes - Christian just pushed it to drm-next-misc - I guess Alex/Christian >didn't pull >to amd-staging-drm-next y

Re: [PATCH v4] drm/scheduler: Avoid accessing freed bad job.

2019-12-03 Thread Deucher, Alexander
@lists.freedesktop.org ; amd-...@lists.freedesktop.org ; Koenig, Christian ; steven.pr...@arm.com Subject: Re: [PATCH v4] drm/scheduler: Avoid accessing freed bad job. Yes - Christian just pushed it to drm-next-misc - I guess Alex/Christian didn't pull to amd-staging-drm-next yet. Andrey On

Re: [PATCH v4] drm/scheduler: Avoid accessing freed bad job.

2019-12-03 Thread Andrey Grodzovsky
en.pr...@arm.com Subject: Re: [PATCH v4] drm/scheduler: Avoid accessing freed bad job. Ping Andrey On 11/25/19 3:51 PM, Andrey Grodzovsky wrote: Problem: Due to a race between drm_sched_cleanup_jobs in sched thread and drm_sched_job_timedout in timeout work there is a possiblity that bad job was al

RE: [PATCH v4] drm/scheduler: Avoid accessing freed bad job.

2019-12-02 Thread Deng, Emily
t;Cc: dri-devel@lists.freedesktop.org; amd-...@lists.freedesktop.org; Koenig, >Christian ; steven.pr...@arm.com >Subject: RE: [PATCH v4] drm/scheduler: Avoid accessing freed bad job. > >[AMD Official Use Only - Internal Distribution Only] > >Reviewed-by: Emily Deng > >>-Original Messa

RE: [PATCH v4] drm/scheduler: Avoid accessing freed bad job.

2019-11-26 Thread Deng, Emily
ly >; steven.pr...@arm.com >Subject: Re: [PATCH v4] drm/scheduler: Avoid accessing freed bad job. > >Ping > >Andrey > >On 11/25/19 3:51 PM, Andrey Grodzovsky wrote: >> Problem: >> Due to a race between drm_sched_cleanup_jobs in sched thread and >> drm_sched_jo

Re: [PATCH v4] drm/scheduler: Avoid accessing freed bad job.

2019-11-26 Thread Andrey Grodzovsky
Ping Andrey On 11/25/19 3:51 PM, Andrey Grodzovsky wrote: Problem: Due to a race between drm_sched_cleanup_jobs in sched thread and drm_sched_job_timedout in timeout work there is a possiblity that bad job was already freed while still being accessed from the timeout thread. Fix: Instead of ju

Re: [PATCH v4] drm/scheduler: Avoid accessing freed bad job.

2019-11-26 Thread Deucher, Alexander
amd-...@lists.freedesktop.org ; Koenig, Christian ; steven.pr...@arm.com ; Deucher, Alexander Subject: Re: [PATCH v4] drm/scheduler: Avoid accessing freed bad job. Christian asked to submit it to drm-misc instead of our drm-next to avoid later conflicts with Steven's patch which he mention

Re: [PATCH v4] drm/scheduler: Avoid accessing freed bad job.

2019-11-25 Thread Grodzovsky, Andrey
t: RE: [PATCH v4] drm/scheduler: Avoid accessing freed bad job. [AMD Official Use Only - Internal Distribution Only] Hi Andrey, Seems you didn't submit this patch? Best wishes Emily Deng >-Original Message- >From: Andrey Grodzovsky >Sent: Monday, November 25, 201

RE: [PATCH v4] drm/scheduler: Avoid accessing freed bad job.

2019-11-25 Thread Deng, Emily
s.freedesktop.org; Koenig, >Christian ; Deng, Emily >; steven.pr...@arm.com; Grodzovsky, Andrey > >Subject: [PATCH v4] drm/scheduler: Avoid accessing freed bad job. > >Problem: >Due to a race between drm_sched_cleanup_jobs in sched thread and >drm_sched_job_timedout in timeou

[PATCH v4] drm/scheduler: Avoid accessing freed bad job.

2019-11-25 Thread Andrey Grodzovsky
Problem: Due to a race between drm_sched_cleanup_jobs in sched thread and drm_sched_job_timedout in timeout work there is a possiblity that bad job was already freed while still being accessed from the timeout thread. Fix: Instead of just peeking at the bad job in the mirror list remove it from th