From: Yuran Pereira <yuran.pereira@hotmail.com>
To: Danilo Krummrich <dakr@redhat.com>
Cc: nouveau@lists.freedesktop.org, linux-kernel@vger.kernel.org,
dri-devel@lists.freedesktop.org, sumit.semwal@linaro.org,
linaro-mm-sig@lists.linaro.org,
linux-kernel-mentees@lists.linuxfoundation.org, daniel@ffwll.ch,
christian.koenig@amd.com, linux-media@vger.kernel.org
Subject: Re: [PATCH] drm/nouveau: Prevents NULL pointer dereference in nouveau_uvmm_sm_prepare
Date: Wed, 15 Nov 2023 14:38:12 +0530 [thread overview]
Message-ID: <GV1PR10MB6563980A0097762C6868E2DCE8B1A@GV1PR10MB6563.EURPRD10.PROD.OUTLOOK.COM> (raw)
In-Reply-To: <6a1ebcef-bade-45a0-9bd9-c05f0226eb88@redhat.com>
Hello Danilo,
On Tue, Nov 14, 2023 at 05:23:59PM +0100, Danilo Krummrich wrote:
> Hi Yuran,
>
> op_map_prepare() can't be called with `args` being NULL, since when called
> through nouveau_uvmm_sm_unmap_prepare() we can't hit the DRM_GPUVA_OP_MAP
> case at all.
>
> Unmapping something never leads to a new mapping being created, it can lead
> to remaps though.
>
Yes, you're right. I certainly hadn't noticed that when I first
submitted this patch.
>
> This check is not required for the reason given above. If you like, you
> can change this patch up to remove the args check and add a comment like:
>
> /* args can't be NULL when called for a map operation. */
>
Sure, I'll do that, sounds reasonable.
Thank you for your feedback.
Yuran
>
> Yeah, I see how this unnecessary check made you think so.
>
> - Danilo
>
>
prev parent reply other threads:[~2024-01-16 11:47 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-26 17:03 [PATCH] drm/nouveau: Prevents NULL pointer dereference in nouveau_uvmm_sm_prepare Yuran Pereira
2023-11-14 16:23 ` [Nouveau] " Danilo Krummrich
2023-11-15 9:08 ` Yuran Pereira [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=GV1PR10MB6563980A0097762C6868E2DCE8B1A@GV1PR10MB6563.EURPRD10.PROD.OUTLOOK.COM \
--to=yuran.pereira@hotmail.com \
--cc=christian.koenig@amd.com \
--cc=dakr@redhat.com \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=linaro-mm-sig@lists.linaro.org \
--cc=linux-kernel-mentees@lists.linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=nouveau@lists.freedesktop.org \
--cc=sumit.semwal@linaro.org \
/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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).