AMD-GFX Archive mirror
 help / color / mirror / Atom feed
From: Alex Deucher <alexdeucher@gmail.com>
To: "Christian König" <christian.koenig@amd.com>
Cc: Friedrich Vock <friedrich.vock@gmx.de>,
	amd-gfx@lists.freedesktop.org,
	 Alex Deucher <alexander.deucher@amd.com>
Subject: Re: [PATCH] drm/amdgpu: Check if NBIO funcs are NULL in amdgpu_device_baco_exit
Date: Tue, 14 May 2024 09:57:21 -0400	[thread overview]
Message-ID: <CADnq5_MiCj7t8dN3WK5RN87GixH4BbqcJ2z3NhD7OgXeSHH8HQ@mail.gmail.com> (raw)
In-Reply-To: <42cc0287-09da-4d71-91e9-685287fb56ca@amd.com>

Applied.  Thanks!

On Tue, May 14, 2024 at 3:27 AM Christian König
<christian.koenig@amd.com> wrote:
>
> Am 14.05.24 um 09:06 schrieb Friedrich Vock:
> > The special case for VM passthrough doesn't check adev->nbio.funcs
> > before dereferencing it. If GPUs that don't have an NBIO block are
> > passed through, this leads to a NULL pointer dereference on startup.
> >
> > Signed-off-by: Friedrich Vock <friedrich.vock@gmx.de>
>
> Acked-by: Christian König <christian.koenig@amd.com>
>
> >
> > Fixes: 1bece222eab ("drm/amdgpu: Clear doorbell interrupt status for Sienna Cichlid")
> > Cc: Alex Deucher <alexander.deucher@amd.com>
> > Cc: Christian König <christian.koenig@amd.com>
> > ---
> >   drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 +-
> >   1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> > index 861ccff78af95..83c4533ee75c8 100644
> > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> > @@ -6165,7 +6165,7 @@ int amdgpu_device_baco_exit(struct drm_device *dev)
> >           adev->nbio.funcs->enable_doorbell_interrupt)
> >               adev->nbio.funcs->enable_doorbell_interrupt(adev, true);
> >
> > -     if (amdgpu_passthrough(adev) &&
> > +     if (amdgpu_passthrough(adev) && adev->nbio.funcs &&
> >           adev->nbio.funcs->clear_doorbell_interrupt)
> >               adev->nbio.funcs->clear_doorbell_interrupt(adev);
> >
> > --
> > 2.45.0
> >
>

      reply	other threads:[~2024-05-14 13:57 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-14  7:06 [PATCH] drm/amdgpu: Check if NBIO funcs are NULL in amdgpu_device_baco_exit Friedrich Vock
2024-05-14  7:21 ` Christian König
2024-05-14 13:57   ` Alex Deucher [this message]

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=CADnq5_MiCj7t8dN3WK5RN87GixH4BbqcJ2z3NhD7OgXeSHH8HQ@mail.gmail.com \
    --to=alexdeucher@gmail.com \
    --cc=alexander.deucher@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=christian.koenig@amd.com \
    --cc=friedrich.vock@gmx.de \
    /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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).