From: Andrey Grodzovsky <andrey.grodzovsky@amd.com>
To: Hangyu Hua <hbh25y@gmail.com>,
yuq825@gmail.com, airlied@linux.ie, daniel@ffwll.ch
Cc: dri-devel@lists.freedesktop.org, lima@lists.freedesktop.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] gpu: drm: remove redundant dma_fence_put() when drm_sched_job_add_dependency() fails
Date: Fri, 29 Apr 2022 12:34:19 -0400 [thread overview]
Message-ID: <bcacc450-5e09-9ce7-e389-0a564da2bcb7@amd.com> (raw)
In-Reply-To: <37a48008-0700-7c60-30d6-ac2f4152114c@gmail.com>
Now it's easy to see it's redundant, it's a problematic design where the
fence 'get' part is happening outside the job->dependencies array logic
but the fence 'put' part is happening inside, leads to confusions such
as adding this 'put'
in the first place. I will look into improving this if possible.
Patch is Reviewed-by: Andrey Grodzovsky <andrey.grodzovsky@amd.com>
Andrey
On 2022-04-28 23:03, Hangyu Hua wrote:
> If fence is released in drm_sched_job_add_implicit_dependencies(), a
> dangling pointer will be in obj->resv.
>
> specific scenario:
> recount = 1 init, obj->resv->fence_excl = fence
> recount = 1 before drm_sched_job_add_implicit_dependencies
> recount = 2 in [2]
> recount = 1 in [1]
> recount = 0 in [3] <--- fence release. But fence still in obj->resv
>
> Thanks,
> Hangyu
prev parent reply other threads:[~2022-04-29 16:34 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-25 8:36 Hangyu Hua
2022-04-25 15:42 ` Andrey Grodzovsky
2022-04-26 2:54 ` Hangyu Hua
2022-04-26 14:48 ` Andrey Grodzovsky
2022-04-26 14:55 ` Andrey Grodzovsky
2022-04-27 2:31 ` Hangyu Hua
[not found] ` <65b6cc23-1a77-7df0-5768-f81cd03b6514@amd.com>
2022-04-28 8:56 ` Hangyu Hua
2022-04-28 15:27 ` Andrey Grodzovsky
2022-04-29 3:03 ` Hangyu Hua
2022-04-29 16:34 ` Andrey Grodzovsky [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=bcacc450-5e09-9ce7-e389-0a564da2bcb7@amd.com \
--to=andrey.grodzovsky@amd.com \
--cc=airlied@linux.ie \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=hbh25y@gmail.com \
--cc=lima@lists.freedesktop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=yuq825@gmail.com \
/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
all inboxes | Powered by JetHome®