From: "Yadav, Sanjay Kumar" <sanjay.kumar.yadav@intel.com>
To: <intel-xe@lists.freedesktop.org>
Subject: Re: [PATCH] fixeup! drm/xe/xe_pagefault: Fix potential uninitialized fence usage in xe_pagefault_handle_vma
Date: Wed, 26 Nov 2025 17:25:59 +0530 [thread overview]
Message-ID: <63892dac-93da-49fb-a265-d8a1753f184b@intel.com> (raw)
In-Reply-To: <20251125102428.2325859-2-naresh.kumar.g@intel.com>
On 25-11-2025 15:54, Nareshkumar Gollakoti wrote:
> 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
>
> Signed-off-by: Nareshkumar Gollakoti <naresh.kumar.g@intel.com>
LGTM
nits: Add a dot at the end of the commit description.
Reviewed-by: Sanjay Yadav <sanjay.kumar.yadav@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);
next prev parent reply other threads:[~2025-11-26 11:56 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-25 10:24 [PATCH] fixeup! drm/xe/xe_pagefault: Fix potential uninitialized fence usage in xe_pagefault_handle_vma Nareshkumar Gollakoti
2025-11-25 14:54 ` ✓ CI.KUnit: success for " Patchwork
2025-11-25 16:02 ` ✓ Xe.CI.BAT: " Patchwork
2025-11-25 18:42 ` ✗ Xe.CI.Full: failure " Patchwork
2025-11-26 11:55 ` Yadav, Sanjay Kumar [this message]
2025-11-26 13:17 ` [PATCH] " 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=63892dac-93da-49fb-a265-d8a1753f184b@intel.com \
--to=sanjay.kumar.yadav@intel.com \
--cc=intel-xe@lists.freedesktop.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