From: "Christian König" <christian.koenig@amd.com>
To: "Khatri, Sunil" <sukhatri@amd.com>,
Sunil Khatri <sunil.khatri@amd.com>,
Alex Deucher <alexander.deucher@amd.com>,
Tvrtko Ursulin <tvrtko.ursulin@igalia.com>
Cc: amd-gfx@lists.freedesktop.org
Subject: Re: [PATCH v5 1/4] drm/amdgpu/userq: initialize gobj_read/write in amdgpu_userq_signal_ioctl
Date: Tue, 24 Feb 2026 13:57:28 +0100 [thread overview]
Message-ID: <ba10fefc-e5c9-4b09-80f9-e73211031c11@amd.com> (raw)
In-Reply-To: <3dbe7fa7-e498-4cab-8b96-2cee679e0eb5@amd.com>
On 2/24/26 13:50, Khatri, Sunil wrote:
>
> On 24-02-2026 02:58 pm, Christian König wrote:
>> On 2/24/26 10:11, Sunil Khatri wrote:
>>> In case num_read_bo_handles or num_write_bo_handles is zero the ptrs
>>> remain uninitialized and during free cause a fault. So to handle such
>>> cases we better set the gobj_read and gobj_write to NULL.
>> Yeah that still doesn't looks like a good idea to me.
>>
>> We intentionally avoid nationalizations like that if they aren't necessary because that allows the compiler to complain about it.
>>
>> Christian.
> Sure Christian.
> @Alex, can you pull in the drm-misc-next to have the fixes in ASDN, or if it is supposed to take some time then in that case i think we need to push the change no 1 and 2 to ASDN as signal/wait IOCTL are broken right now.
We just need the ack from Alex to cherry pick the patch from Srini over to ASDN. Should be able to do this by tomorrow.
Regards,
Christian.
>
> Regards
> Sunil Khatri
>>
>>> Fixes: 3cf117572294 ("drm/amdgpu/userq: Use drm_gem_objects_lookup in amdgpu_userq_signal_ioctl")
>>> Signed-off-by: Sunil Khatri <sunil.khatri@amd.com>
>>> ---
>>> drivers/gpu/drm/amd/amdgpu/amdgpu_userq_fence.c | 2 +-
>>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_userq_fence.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_userq_fence.c
>>> index 18e77b61b201..e53e14e3bf2d 100644
>>> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_userq_fence.c
>>> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_userq_fence.c
>>> @@ -465,7 +465,7 @@ int amdgpu_userq_signal_ioctl(struct drm_device *dev, void *data,
>>> const unsigned int num_read_bo_handles = args->num_bo_read_handles;
>>> struct amdgpu_fpriv *fpriv = filp->driver_priv;
>>> struct amdgpu_userq_mgr *userq_mgr = &fpriv->userq_mgr;
>>> - struct drm_gem_object **gobj_write, **gobj_read;
>>> + struct drm_gem_object **gobj_write = NULL, **gobj_read = NULL;
>>> u32 *syncobj_handles, num_syncobj_handles;
>>> struct amdgpu_userq_fence *userq_fence;
>>> struct amdgpu_usermode_queue *queue;
next prev parent reply other threads:[~2026-02-24 12:57 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-24 9:11 [PATCH v5 0/4] signal and wait ioctl fixes Sunil Khatri
2026-02-24 9:11 ` [PATCH v5 1/4] drm/amdgpu/userq: initialize gobj_read/write in amdgpu_userq_signal_ioctl Sunil Khatri
2026-02-24 9:28 ` Christian König
2026-02-24 12:50 ` Khatri, Sunil
2026-02-24 12:57 ` Christian König [this message]
2026-02-24 14:16 ` Alex Deucher
2026-02-24 9:11 ` [PATCH v5 2/4] drm/amdgpu/userq: initialize gobj_read/write in amdgpu_userq_wait_ioctl Sunil Khatri
2026-02-24 9:11 ` [PATCH v5 3/4] drm/amdgpu: add upper bound check on user inputs in signal ioctl Sunil Khatri
2026-02-24 9:11 ` [PATCH v5 4/4] drm/amdgpu: add upper bound check on user inputs in wait ioctl Sunil Khatri
2026-02-24 15:06 ` Alex Deucher
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=ba10fefc-e5c9-4b09-80f9-e73211031c11@amd.com \
--to=christian.koenig@amd.com \
--cc=alexander.deucher@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=sukhatri@amd.com \
--cc=sunil.khatri@amd.com \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.