From: Raag Jadav <raag.jadav@intel.com>
To: Tomasz Lis <tomasz.lis@intel.com>
Cc: intel-xe@lists.freedesktop.org, Matthew Brost <matthew.brost@intel.com>
Subject: Re: [PATCH v1] drm/xe: Fix confusion with locals on context creation
Date: Mon, 23 Mar 2026 05:12:52 +0100 [thread overview]
Message-ID: <acC9xK1n_2Pgl_Wh@black.igk.intel.com> (raw)
In-Reply-To: <20260320145733.1337682-1-tomasz.lis@intel.com>
On Fri, Mar 20, 2026 at 03:57:33PM +0100, Tomasz Lis wrote:
> After setting a local variable, check that local value rather that
> checking destination at which the value will be stored later.
>
> This fixes the obvious mistake in error path; without it,
> allocation fail would lead to NULL dereference during context
> creation.
>
> Fixes: 89340099c6a4 ("drm/xe/lrc: Refactor context init into xe_lrc_ctx_init()")
> Signed-off-by: Tomasz Lis <tomasz.lis@intel.com>
> Cc: Raag Jadav <raag.jadav@intel.com>
> Cc: Matthew Brost <matthew.brost@intel.com>
Already fixed[1], but not sure if it's landed yet.
[1] https://lore.kernel.org/intel-xe/20260305184519.155060-1-shuicheng.lin@intel.com/
Raag
> ---
> drivers/gpu/drm/xe/xe_lrc.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/xe/xe_lrc.c b/drivers/gpu/drm/xe/xe_lrc.c
> index c5cfd8f75a94..77cd57788837 100644
> --- a/drivers/gpu/drm/xe/xe_lrc.c
> +++ b/drivers/gpu/drm/xe/xe_lrc.c
> @@ -1607,8 +1607,8 @@ static int xe_lrc_init(struct xe_lrc *lrc, struct xe_hw_engine *hwe, struct xe_v
> bo = xe_bo_create_pin_map_novm(xe, tile, bo_size,
> ttm_bo_type_kernel,
> bo_flags, false);
> - if (IS_ERR(lrc->bo))
> - return PTR_ERR(lrc->bo);
> + if (IS_ERR(bo))
> + return PTR_ERR(bo);
>
> lrc->bo = bo;
>
> --
> 2.25.1
>
next prev parent reply other threads:[~2026-03-23 4:12 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-20 14:57 [PATCH v1] drm/xe: Fix confusion with locals on context creation Tomasz Lis
2026-03-20 14:58 ` ✓ CI.KUnit: success for " Patchwork
2026-03-20 15:41 ` ✓ Xe.CI.BAT: " Patchwork
2026-03-21 16:12 ` ✗ Xe.CI.FULL: failure " Patchwork
2026-03-22 5:48 ` [PATCH v1] " Matthew Brost
2026-03-23 4:12 ` Raag Jadav [this message]
2026-03-23 14:02 ` Lis, Tomasz
2026-03-26 1:24 ` Matthew Brost
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=acC9xK1n_2Pgl_Wh@black.igk.intel.com \
--to=raag.jadav@intel.com \
--cc=intel-xe@lists.freedesktop.org \
--cc=matthew.brost@intel.com \
--cc=tomasz.lis@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