From: "Danilo Krummrich" <dakr@kernel.org>
To: "Jonathan Cavitt" <jonathan.cavitt@intel.com>
Cc: <dri-devel@lists.freedesktop.org>, <saurabhg.gupta@intel.com>,
<alex.zuo@intel.com>, <matthew.brost@intel.com>,
<thomas.hellstrom@linux.intel.com>, <aliceryhl@google.com>,
"dri-devel" <dri-devel-bounces@lists.freedesktop.org>
Subject: Re: [PATCH] drm/gpuvm: Do not prepare NULL objects
Date: Thu, 16 Apr 2026 22:01:10 +0200 [thread overview]
Message-ID: <DHUUHT136HPP.1L7OL7DR568Q6@kernel.org> (raw)
In-Reply-To: <20260130191953.61718-2-jonathan.cavitt@intel.com>
(Cc: Alice)
On Fri Jan 30, 2026 at 8:19 PM CET, Jonathan Cavitt wrote:
> Statis analysis issue:
>
> drm_gpuvm_prepare_range issues an exec_object_prepare call to all
> drm_gem_objects mapped between addr and addr + range. However, it is
> possible (albeit very unlikely) that the objects found through
It is not as unlikely as you might think. The documentation of
drm_gpuvm_for_each_va_range() explicitly states:
"This iterator does not skip over the &drm_gpuvm's @kernel_alloc_node."
And the kernel_alloc_node does not have a GEM object set. Also, drivers are free
to insert VAs that do not have a GEM object set, e.g. when they have the
DRM_GPUVA_SPARSE flag set.
> drm_gpuvm_for_each_va_range (as connected to va->gem) are NULL, as seen
> in other functions such as drm_gpuva_link and drm_gpuva_unlink_defer.
That said, there is a "real" justification, other than "we do the same thing in
other functions" that would have been good to put this into the commit message.
The reason I say "would have been" is because this patch has already been
applied -- unfortunately without going through the corresponding maintainer (and
non-Intel reviewers). I only noticed it by accident as I saw it pop up in
drm-misc-next.
No action needed as the code itself is obviously correct, but for the next time,
please make sure to send patches to the corresponding maintainers and reviewers.
- Danilo
next prev parent reply other threads:[~2026-04-16 20:01 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-30 19:19 [PATCH] drm/gpuvm: Do not prepare NULL objects Jonathan Cavitt
2026-02-24 15:41 ` Krzysztof Karas
2026-04-16 20:01 ` Danilo Krummrich [this message]
2026-04-16 20:23 ` Cavitt, Jonathan
2026-04-16 20:44 ` Danilo Krummrich
2026-04-17 4:20 ` Luben Tuikov
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=DHUUHT136HPP.1L7OL7DR568Q6@kernel.org \
--to=dakr@kernel.org \
--cc=alex.zuo@intel.com \
--cc=aliceryhl@google.com \
--cc=dri-devel-bounces@lists.freedesktop.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=jonathan.cavitt@intel.com \
--cc=matthew.brost@intel.com \
--cc=saurabhg.gupta@intel.com \
--cc=thomas.hellstrom@linux.intel.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