From: Karol Herbst <kherbst@redhat.com>
To: linux-kernel@vger.kernel.org
Cc: "open list:DRM DRIVER FOR NVIDIA GEFORCE/QUADRO GPUS"
<nouveau@lists.freedesktop.org>,
"open list:DRM DRIVER FOR NVIDIA GEFORCE/QUADRO GPUS"
<dri-devel@lists.freedesktop.org>,
Ben Skeggs <bskeggs@redhat.com>, Daniel Vetter <daniel@ffwll.ch>,
Gourav Samaiya <gsamaiya@nvidia.com>
Subject: Re: [Nouveau] [PATCH] drm/nouveau/acr: Abort loading ACR if no firmware was found
Date: Tue, 23 May 2023 11:37:13 +0200 [thread overview]
Message-ID: <CACO55tuZeJZ6GTA+ooaXsSgde2Zy70qpe8Cg_AEfZRXtmd2LWA@mail.gmail.com> (raw)
In-Reply-To: <20230522201838.1496622-1-kherbst@redhat.com>
On Mon, May 22, 2023 at 10:18 PM Karol Herbst <kherbst@redhat.com> wrote:
>
> This fixes a NULL pointer access inside nvkm_acr_oneinit in case necessary
> firmware files couldn't be loaded.
>
> Closes: https://gitlab.freedesktop.org/drm/nouveau/-/issues/212
> Fixes: 4b569ded09fd ("drm/nouveau/acr/ga102: initial support")
> Signed-off-by: Karol Herbst <kherbst@redhat.com>
> ---
> drivers/gpu/drm/nouveau/nvkm/subdev/acr/base.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/acr/base.c b/drivers/gpu/drm/nouveau/nvkm/subdev/acr/base.c
> index 795f3a649b12..6388234c352c 100644
> --- a/drivers/gpu/drm/nouveau/nvkm/subdev/acr/base.c
> +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/acr/base.c
> @@ -224,7 +224,7 @@ nvkm_acr_oneinit(struct nvkm_subdev *subdev)
> u64 falcons;
> int ret, i;
>
> - if (list_empty(&acr->hsfw)) {
> + if (list_empty(&acr->hsfw) || !acr->func->wpr_layout) {
Now thinking about this, it should probably also check acr->func...
> nvkm_debug(subdev, "No HSFW(s)\n");
> nvkm_acr_cleanup(acr);
> return 0;
> --
> 2.40.1
>
next prev parent reply other threads:[~2023-05-23 9:37 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-22 20:18 [Nouveau] [PATCH] drm/nouveau/acr: Abort loading ACR if no firmware was found Karol Herbst
2023-05-23 9:37 ` Karol Herbst [this message]
2023-07-12 19:30 ` Dave Airlie
2023-07-12 20:38 ` Ben Skeggs
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=CACO55tuZeJZ6GTA+ooaXsSgde2Zy70qpe8Cg_AEfZRXtmd2LWA@mail.gmail.com \
--to=kherbst@redhat.com \
--cc=bskeggs@redhat.com \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=gsamaiya@nvidia.com \
--cc=linux-kernel@vger.kernel.org \
--cc=nouveau@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 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 NNTP newsgroup(s).