All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
To: Lucas De Marchi <lucas.demarchi@intel.com>, <John.C.Harrison@intel.com>
Cc: Intel-GFX@lists.freedesktop.org, DRI-Devel@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH 4/4] drm/i915/guc: Don't go bang in GuC log if no GuC
Date: Fri, 3 Dec 2021 12:00:59 -0800	[thread overview]
Message-ID: <d2ea5d3b-2b53-8aa8-8a6e-dec024f573ac@intel.com> (raw)
In-Reply-To: <20211203003307.ju75hmimn6sfhfmk@ldmartin-desk2>



On 12/2/2021 4:33 PM, Lucas De Marchi wrote:
> On Thu, Dec 02, 2021 at 04:06:23PM -0800, John.C.Harrison@Intel.com 
> wrote:
>> From: John Harrison <John.C.Harrison@Intel.com>
>>
>> If the GuC has failed to load for any reason and then the user pokes
>> the debugfs GuC log interface, a BUG and/or null pointer deref can
>> occur. Don't let that happen.
>>
>> Signed-off-by: John Harrison <John.C.Harrison@Intel.com>
>
>
> Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com>
>
> Lucas De Marchi
>

Do we need a fixes tag? or is it ok to not have it for debugfs bugs?

Daniele

>> ---
>> drivers/gpu/drm/i915/gt/uc/intel_guc_log_debugfs.c | 4 ++--
>> 1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/i915/gt/uc/intel_guc_log_debugfs.c 
>> b/drivers/gpu/drm/i915/gt/uc/intel_guc_log_debugfs.c
>> index 46026c2c1722..8fd068049376 100644
>> --- a/drivers/gpu/drm/i915/gt/uc/intel_guc_log_debugfs.c
>> +++ b/drivers/gpu/drm/i915/gt/uc/intel_guc_log_debugfs.c
>> @@ -31,7 +31,7 @@ static int guc_log_level_get(void *data, u64 *val)
>> {
>>     struct intel_guc_log *log = data;
>>
>> -    if (!intel_guc_is_used(log_to_guc(log)))
>> +    if (!log->vma)
>>         return -ENODEV;
>>
>>     *val = intel_guc_log_get_level(log);
>> @@ -43,7 +43,7 @@ static int guc_log_level_set(void *data, u64 val)
>> {
>>     struct intel_guc_log *log = data;
>>
>> -    if (!intel_guc_is_used(log_to_guc(log)))
>> +    if (!log->vma)
>>         return -ENODEV;
>>
>>     return intel_guc_log_set_level(log, val);
>> -- 
>> 2.25.1
>>


  reply	other threads:[~2021-12-03 20:01 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-03  0:06 [Intel-gfx] [PATCH 0/4] Assorted fixes/tweaks to GuC support John.C.Harrison
2021-12-03  0:06 ` John.C.Harrison
2021-12-03  0:06 ` [Intel-gfx] [PATCH 1/4] drm/i915/uc: Allow platforms to have GuC but not HuC John.C.Harrison
2021-12-03  0:06   ` John.C.Harrison
2021-12-03  0:06 ` [Intel-gfx] [PATCH 2/4] drm/i915/guc: Request RP0 before loading firmware John.C.Harrison
2021-12-03  0:06   ` John.C.Harrison
2021-12-03  0:06 ` [Intel-gfx] [PATCH 3/4] drm/i915/guc: Increase GuC log size for CONFIG_DEBUG_GEM John.C.Harrison
2021-12-03  0:06   ` John.C.Harrison
2021-12-03  0:06 ` [Intel-gfx] [PATCH 4/4] drm/i915/guc: Don't go bang in GuC log if no GuC John.C.Harrison
2021-12-03  0:06   ` John.C.Harrison
2021-12-03  0:33   ` [Intel-gfx] " Lucas De Marchi
2021-12-03  0:33     ` Lucas De Marchi
2021-12-03 20:00     ` Daniele Ceraolo Spurio [this message]
2021-12-07  7:01       ` [Intel-gfx] " Lucas De Marchi
2021-12-07  7:01         ` Lucas De Marchi
2021-12-03  0:20 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for Assorted fixes/tweaks to GuC support Patchwork
2021-12-03  0:21 ` [Intel-gfx] ✗ Fi.CI.SPARSE: " Patchwork
2021-12-03  0:44 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2021-12-03  1:55 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork
2021-12-04  1:23 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for Assorted fixes/tweaks to GuC support (rev3) Patchwork
2021-12-04  1:24 ` [Intel-gfx] ✗ Fi.CI.SPARSE: " Patchwork
2021-12-04  2:03 ` [Intel-gfx] ✗ Fi.CI.BAT: failure " Patchwork
  -- strict thread matches above, loose matches on Subject: below --
2021-12-10  4:40 [Intel-gfx] [PATCH 0/4] Assorted fixes/tweaks to GuC support John.C.Harrison
2021-12-10  4:40 ` [Intel-gfx] [PATCH 4/4] drm/i915/guc: Don't go bang in GuC log if no GuC John.C.Harrison

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=d2ea5d3b-2b53-8aa8-8a6e-dec024f573ac@intel.com \
    --to=daniele.ceraolospurio@intel.com \
    --cc=DRI-Devel@lists.freedesktop.org \
    --cc=Intel-GFX@lists.freedesktop.org \
    --cc=John.C.Harrison@intel.com \
    --cc=lucas.demarchi@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.