All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Quan, Evan" <Evan.Quan@amd.com>
To: "Chen, Guchun" <Guchun.Chen@amd.com>,
	"amd-gfx@lists.freedesktop.org" <amd-gfx@lists.freedesktop.org>,
	"Siqueira, Rodrigo" <Rodrigo.Siqueira@amd.com>,
	"Pillai, Aurabindo" <Aurabindo.Pillai@amd.com>,
	"Wentland, Harry" <Harry.Wentland@amd.com>,
	"Yin, Tianci (Rico)" <Tianci.Yin@amd.com>,
	"Deucher, Alexander" <Alexander.Deucher@amd.com>
Cc: "Chen, Guchun" <Guchun.Chen@amd.com>
Subject: RE: [PATCH 2/2] drm/amd/display: fix null pointer access in gpu reset
Date: Mon, 28 Jun 2021 09:50:38 +0000	[thread overview]
Message-ID: <DM6PR12MB26193E53A87433C718E38BE1E4039@DM6PR12MB2619.namprd12.prod.outlook.com> (raw)
In-Reply-To: <20210628092730.4722-2-guchun.chen@amd.com>

[AMD Official Use Only]

Series is reviewed-and-tested-by: Evan Quan <evan.quan@amd.com>

> -----Original Message-----
> From: amd-gfx <amd-gfx-bounces@lists.freedesktop.org> On Behalf Of
> Guchun Chen
> Sent: Monday, June 28, 2021 5:28 PM
> To: amd-gfx@lists.freedesktop.org; Siqueira, Rodrigo
> <Rodrigo.Siqueira@amd.com>; Pillai, Aurabindo
> <Aurabindo.Pillai@amd.com>; Wentland, Harry
> <Harry.Wentland@amd.com>; Yin, Tianci (Rico) <Tianci.Yin@amd.com>;
> Deucher, Alexander <Alexander.Deucher@amd.com>
> Cc: Chen, Guchun <Guchun.Chen@amd.com>
> Subject: [PATCH 2/2] drm/amd/display: fix null pointer access in gpu reset
> 
> During GPU reset, when receiving a DMCUB OUTBUX0 interrupt, DAL code
> will set it to be OUTBOX interrupt and sets hw interrupt.
> However, OUTBOX interrupt is not registered yet, so a NULL pointer access
> will be executed.
> 
> Call Trace:
>   dal_irq_service_set+0x30/0x90 [amdgpu]
>   dc_interrupt_set+0x24/0x30 [amdgpu]
>   amdgpu_dm_set_dmub_outbox_irq_state+0x22/0x30 [amdgpu]
>   amdgpu_irq_update+0x77/0xa0 [amdgpu]
>   amdgpu_irq_gpu_reset_resume_helper+0x67/0xa0 [amdgpu]
>   amdgpu_do_asic_reset+0x219/0x260 [amdgpu]
>   amdgpu_device_gpu_recover.cold+0x8c5/0xb64 [amdgpu]
>   amdgpu_debugfs_gpu_recover_show+0x2c/0x60 [amdgpu]
>   seq_read_iter+0xc2/0x450
>   ? do_anonymous_page+0x22c/0x3b0
>   seq_read+0xf9/0x140
>   full_proxy_read+0x5c/0x90
>   vfs_read+0xaa/0x190
>   ksys_read+0x67/0xe0
>   __x64_sys_read+0x1a/0x20
> 
> Fixes: 85465bd6dc6e drm/amdgpu/display: remove an old DCN3 guard
> 
> Signed-off-by: Guchun Chen <guchun.chen@amd.com>
> ---
>  drivers/gpu/drm/amd/display/dc/irq/irq_service.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/amd/display/dc/irq/irq_service.c
> b/drivers/gpu/drm/amd/display/dc/irq/irq_service.c
> index 5f245bde54ff..a2a4fbeb83f8 100644
> --- a/drivers/gpu/drm/amd/display/dc/irq/irq_service.c
> +++ b/drivers/gpu/drm/amd/display/dc/irq/irq_service.c
> @@ -119,7 +119,7 @@ bool dal_irq_service_set(
> 
>  	dal_irq_service_ack(irq_service, source);
> 
> -	if (info->funcs->set)
> +	if (info->funcs && info->funcs->set)
>  		return info->funcs->set(irq_service, info, enable);
> 
>  	dal_irq_service_set_generic(irq_service, info, enable); @@ -153,7
> +153,7 @@ bool dal_irq_service_ack(
>  		return false;
>  	}
> 
> -	if (info->funcs->ack)
> +	if (info->funcs && info->funcs->ack)
>  		return info->funcs->ack(irq_service, info);
> 
>  	dal_irq_service_ack_generic(irq_service, info);
> --
> 2.17.1
> 
> _______________________________________________
> amd-gfx mailing list
> amd-gfx@lists.freedesktop.org
> https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.
> freedesktop.org%2Fmailman%2Flistinfo%2Famd-
> gfx&amp;data=04%7C01%7Cevan.quan%40amd.com%7C338ed5d1487e4834
> 76e908d93a1706a7%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C6
> 37604692835538651%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMD
> AiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=
> GTl5TKifsVpzCiccc%2BXmqnooa1grUmGjyPmMTCN1zmI%3D&amp;reserved
> =0
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

  reply	other threads:[~2021-06-28  9:50 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-28  9:27 [PATCH 1/2] drm/amd/display: fix incorrrect valid irq check Guchun Chen
2021-06-28  9:27 ` [PATCH 2/2] drm/amd/display: fix null pointer access in gpu reset Guchun Chen
2021-06-28  9:50   ` Quan, Evan [this message]
2021-06-28 13:54   ` Harry Wentland

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=DM6PR12MB26193E53A87433C718E38BE1E4039@DM6PR12MB2619.namprd12.prod.outlook.com \
    --to=evan.quan@amd.com \
    --cc=Alexander.Deucher@amd.com \
    --cc=Aurabindo.Pillai@amd.com \
    --cc=Guchun.Chen@amd.com \
    --cc=Harry.Wentland@amd.com \
    --cc=Rodrigo.Siqueira@amd.com \
    --cc=Tianci.Yin@amd.com \
    --cc=amd-gfx@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 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.