mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Danilo Krummrich <dakr@kernel.org>
To: Tvrtko Ursulin <tvrtko.ursulin@igalia.com>
Cc: phasta@kernel.org, "Sumit Semwal" <sumit.semwal@linaro.org>,
	"Gustavo Padovan" <gustavo@padovan.org>,
	"Christian König" <christian.koenig@amd.com>,
	linux-media@vger.kernel.org, dri-devel@lists.freedesktop.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] dma-fence: Correct return of dma_fence_driver_name()
Date: Fri, 24 Oct 2025 15:13:39 +0200	[thread overview]
Message-ID: <8cba66d2-9608-4a5c-a2af-6cc91f46a49f@kernel.org> (raw)
In-Reply-To: <5640fbf1-7b8d-4537-9f1a-b401a7a4934b@igalia.com>

On 10/24/25 2:40 PM, Tvrtko Ursulin wrote:
> You trim too much of the quote making it unclear if you read the whole story.

I'm well aware of the context.
> If the driver isn't detached from the signalled fence then it is vulnerable to
> use after free.
When someone just reads "detached-driver" is creates the impression that the
driver is unbound from its device, since this is what this term is usually used for.

(And this is even the case you want to protect against, i.e. the string behind
the pointer returned by get_driver_name() has been freed.)

However, the condition that has changed when you print "driver-detached" is that
the fence has been signaled, independent of whether the driver has been detached
from the device.

Now, you can argue that you mean "driver has been detached from the fence",
which means something along the lines of "the driver has no business with the
fence anymore", but this is not what people think of when they read
"detached-driver".

  reply	other threads:[~2025-10-24 13:13 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-24  7:50 Philipp Stanner
2025-10-24  8:31 ` Tvrtko Ursulin
2025-10-24 10:59   ` Philipp Stanner
2025-10-24 11:31     ` Tvrtko Ursulin
2025-10-24 12:12       ` Danilo Krummrich
2025-10-24 12:40         ` Tvrtko Ursulin
2025-10-24 13:13           ` Danilo Krummrich [this message]
2025-10-24 13:37             ` Tvrtko Ursulin
2025-10-24 14:17               ` Danilo Krummrich
2025-10-24 14:28                 ` Tvrtko Ursulin
2025-10-24 14:36                   ` Danilo Krummrich
2025-10-24 16:06                     ` Tvrtko Ursulin
2025-10-24 16:18                       ` Danilo Krummrich

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=8cba66d2-9608-4a5c-a2af-6cc91f46a49f@kernel.org \
    --to=dakr@kernel.org \
    --cc=christian.koenig@amd.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=gustavo@padovan.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=phasta@kernel.org \
    --cc=sumit.semwal@linaro.org \
    --cc=tvrtko.ursulin@igalia.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®