Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Matthew Brost <matthew.brost@intel.com>
To: Ohad Sharabi <osharabi@habana.ai>
Cc: intel-xe@lists.freedesktop.org
Subject: Re: [PATCH] drm/xe: skip register UC debugfs if UC disabled
Date: Thu, 4 Jan 2024 18:45:55 +0000	[thread overview]
Message-ID: <ZZb849qEXZpYvTCt@DUT025-TGLU.fm.intel.com> (raw)
In-Reply-To: <20240104100557.1204296-1-osharabi@habana.ai>

On Thu, Jan 04, 2024 at 12:05:57PM +0200, Ohad Sharabi wrote:
> When working with execlist we should not register the UC debugfs entries.
> 
> Accessing those entries when UC is disabled can lead to a kernel crush
> (NULL pointer dereference).
> 
> Signed-off-by: Ohad Sharabi <osharabi@habana.ai>

Reviewed-by: Matthew Brost <matthew.brost@intel.com>

> ---
>  drivers/gpu/drm/xe/xe_gt_debugfs.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/xe/xe_gt_debugfs.c b/drivers/gpu/drm/xe/xe_gt_debugfs.c
> index c4b67cf09f8f..bafd55a7fb16 100644
> --- a/drivers/gpu/drm/xe/xe_gt_debugfs.c
> +++ b/drivers/gpu/drm/xe/xe_gt_debugfs.c
> @@ -245,5 +245,6 @@ void xe_gt_debugfs_register(struct xe_gt *gt)
>  				 ARRAY_SIZE(debugfs_list),
>  				 root, minor);
>  
> -	xe_uc_debugfs_register(&gt->uc, root);
> +	if (xe_device_uc_enabled(xe))
> +		xe_uc_debugfs_register(&gt->uc, root);
>  }
> -- 
> 2.34.1
> 

  parent reply	other threads:[~2024-01-04 18:46 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-04 10:05 [PATCH] drm/xe: skip register UC debugfs if UC disabled Ohad Sharabi
2024-01-04 18:09 ` ✓ CI.Patch_applied: success for " Patchwork
2024-01-04 18:09 ` ✓ CI.checkpatch: " Patchwork
2024-01-04 18:10 ` ✓ CI.KUnit: " Patchwork
2024-01-04 18:18 ` ✓ CI.Build: " Patchwork
2024-01-04 18:18 ` ✓ CI.Hooks: " Patchwork
2024-01-04 18:20 ` ✓ CI.checksparse: " Patchwork
2024-01-04 18:45 ` Matthew Brost [this message]
2024-01-04 18:57 ` ✓ CI.BAT: " Patchwork
2024-02-21  5:57 ` [PATCH] " Lucas De Marchi
2024-02-21  7:28   ` Ohad Sharabi

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=ZZb849qEXZpYvTCt@DUT025-TGLU.fm.intel.com \
    --to=matthew.brost@intel.com \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=osharabi@habana.ai \
    /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