From: Rodrigo Vivi <rodrigo.vivi@intel.com>
To: Nareshkumar Gollakoti <naresh.kumar.g@intel.com>
Cc: <intel-gfx@lists.freedesktop.org>
Subject: Re: [PATCH] fixeup! drm/xe/xe_pagefault: Fix potential uninitialized fence usage in xe_pagefault_handle_vma
Date: Tue, 25 Nov 2025 08:35:29 -0500 [thread overview]
Message-ID: <aSWwoYwYb4OIVy1A@intel.com> (raw)
In-Reply-To: <20251125101841.2325554-2-naresh.kumar.g@intel.com>
On Tue, Nov 25, 2025 at 03:48:42PM +0530, Nareshkumar Gollakoti wrote:
Hi Nareshkumar,
Thank you so much for the patch. I believe the change below is a good
addition, but the patch itself is in a bad format.
fixup in the commit subject is absolutely no no! This is a git indication
that the patch should be squashed to the one introducing the error,
but we are in a non-rebasing branch. So you need to provide a fix
as a new patch and using the proper tags indicating which patch
it is fixing and Cc'ing author and reviewer of the original patch.
In this case:
Fixes: fb544b844508 ("drm/xe: Implement xe_pagefault_queue_work")
Cc: Matthew Brost <matthew.brost@intel.com>
Cc: Stuart Summers <stuart.summers@intel.com>
> The variable "fence" should be initialized to NULL,
> and any usage of fence should be guarded
> by a check to ensure it is not NULL
Furthermore, the message itself here is a bit strange. It is not
necessarily true that it 'should' be initialized. In this case
it looks more like a false positive of static analysis tools,
but it would be good to have this protection just in case...
So, some rephrasing here might be good.
Please read the documentation on how to submit patches for the
proper style and messages:
https://www.kernel.org/doc/html/latest/process/submitting-patches.html
Thanks,
Rodrigo.
>
> Signed-off-by: Nareshkumar Gollakoti <naresh.kumar.g@intel.com>
> ---
> drivers/gpu/drm/xe/xe_pagefault.c | 8 +++++---
> 1 file changed, 5 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/xe/xe_pagefault.c b/drivers/gpu/drm/xe/xe_pagefault.c
> index afb06598b6e1..401f1835939b 100644
> --- a/drivers/gpu/drm/xe/xe_pagefault.c
> +++ b/drivers/gpu/drm/xe/xe_pagefault.c
> @@ -70,7 +70,7 @@ static int xe_pagefault_handle_vma(struct xe_gt *gt, struct xe_vma *vma,
> struct xe_tile *tile = gt_to_tile(gt);
> struct xe_validation_ctx ctx;
> struct drm_exec exec;
> - struct dma_fence *fence;
> + struct dma_fence *fence = NULL;
> int err, needs_vram;
>
> lockdep_assert_held_write(&vm->lock);
> @@ -122,8 +122,10 @@ static int xe_pagefault_handle_vma(struct xe_gt *gt, struct xe_vma *vma,
> }
> }
>
> - dma_fence_wait(fence, false);
> - dma_fence_put(fence);
> + if (fence) {
> + dma_fence_wait(fence, false);
> + dma_fence_put(fence);
> + }
>
> unlock_dma_resv:
> xe_validation_ctx_fini(&ctx);
> --
> 2.43.0
>
next prev parent reply other threads:[~2025-11-25 13:35 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-25 10:18 [PATCH] fixeup! drm/xe/xe_pagefault: Fix potential uninitialized fence usage in xe_pagefault_handle_vma Nareshkumar Gollakoti
2025-11-25 12:36 ` ✓ i915.CI.BAT: success for " Patchwork
2025-11-25 13:35 ` Rodrigo Vivi [this message]
2025-11-25 14:48 ` [PATCH] " Kumar G, Naresh
2025-11-26 2:03 ` Matthew Brost
2025-11-26 4:04 ` Upadhyay, Tejas
2025-11-25 22:22 ` ✗ i915.CI.Full: failure for " Patchwork
2025-11-26 2:01 ` [PATCH] " Matthew Brost
2025-11-26 2:07 ` Matthew Brost
2025-11-26 4:02 ` Upadhyay, Tejas
2025-11-26 15:50 ` Andi Shyti
2025-11-26 16:07 ` Kumar G, Naresh
-- strict thread matches above, loose matches on Subject: below --
2025-11-25 10:24 Nareshkumar Gollakoti
2025-11-26 11:55 ` Yadav, Sanjay Kumar
2025-11-26 13:17 ` Kumar G, Naresh
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=aSWwoYwYb4OIVy1A@intel.com \
--to=rodrigo.vivi@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=naresh.kumar.g@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 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.