From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 13907EB64DA for ; Wed, 12 Jul 2023 19:31:06 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 89B2410E5D5; Wed, 12 Jul 2023 19:31:05 +0000 (UTC) Received: from mail-ot1-x32c.google.com (mail-ot1-x32c.google.com [IPv6:2607:f8b0:4864:20::32c]) by gabe.freedesktop.org (Postfix) with ESMTPS id 8CAAC10E5D6; Wed, 12 Jul 2023 19:31:03 +0000 (UTC) Received: by mail-ot1-x32c.google.com with SMTP id 46e09a7af769-6b8decf09e1so6445470a34.0; Wed, 12 Jul 2023 12:31:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1689190262; x=1691782262; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=yVtSCpW+Tth4mC3MWGAVEkXOAuk+fenRNi3sCg0wW/s=; b=r32FMANDItl8SWdMt3H1qMFDlAHWoxWPe6MrEB33WVrdTB8FoKKtRmyAx5c6yFfK0e 1oOPzWmuNc6xljTGS/Z3ai96BCd7pCg45e+Mv9tfebdsFfxen9ScPuKZHpaJGC/4EQv+ J1/KhQ5rUKe0SFwZ/8/5bbM3Mn7TINH3RXSbno8ZRUvc6MTmhZlHZ8Ih71+15+c9jfR2 CjxvCRzZBzoQ9J3PUoJqXnwgHHlpNcC0ZF1szDyIyPteTEErrvpAfhbKAl0XqeufIRaN sjL8Wt+uGr7P+5xN+x7EFC+Ha50BJcGI0UCqoNr733Z/dyLS0NZjjZbGHe8F+jsYAbNm Qdyg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689190262; x=1691782262; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=yVtSCpW+Tth4mC3MWGAVEkXOAuk+fenRNi3sCg0wW/s=; b=g+Se1abqMQJzPeyFHifBlb2DOIRveKTbTFgmGkBhc6slVRFwVzJfz6GdQJn2dR5nak f3vm5UMoUvHX2UJAb3zu2cic2TB7PTNme9NJ0AygCJSRYU+Vqjba81BGZNqaCjNBvyir 6wN09tJlOj1el7tQ7Q6vB3jq+zNs7VOp5EmpLmWzgKiSjhaFfGBpVNWLTKSBMp6iiv1d 1amsXhjKz2/OUGFHii5/4bElWjP90ltOSC5DDcm/efI06GPUly1jxc4Av9CxoXtn6v5P Dhr2mWuBEScx+obUj+V726KilVmPL99LSljt9kYYSd+jI9gX9Y7QpcsDGsb+kIyxtavZ whkA== X-Gm-Message-State: ABy/qLYjQ39LKXh9X358B6Q3GHbVg6sJFISwMX2mlqP0pbz4uZQZaPbQ F74D8vBuHL7DL35kTyKVSCKokIzW3QujXBMJu04= X-Google-Smtp-Source: APBJJlEt110G42kGYTiSWg5RkQiygRnhzKc4MikyaoVcdGUWksdFdFLUXc1bxTG+gXM5gOw+VMyJ2yO+C7wyuDUzvdI= X-Received: by 2002:a05:6870:b24e:b0:1b3:e46a:7164 with SMTP id b14-20020a056870b24e00b001b3e46a7164mr21502131oam.40.1689190262500; Wed, 12 Jul 2023 12:31:02 -0700 (PDT) MIME-Version: 1.0 References: <20230522201838.1496622-1-kherbst@redhat.com> In-Reply-To: From: Dave Airlie Date: Thu, 13 Jul 2023 05:30:49 +1000 Message-ID: To: Karol Herbst Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Subject: Re: [Nouveau] [PATCH] drm/nouveau/acr: Abort loading ACR if no firmware was found X-BeenThere: nouveau@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Nouveau development list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "open list:DRM DRIVER FOR NVIDIA GEFORCE/QUADRO GPUS" , linux-kernel@vger.kernel.org, "open list:DRM DRIVER FOR NVIDIA GEFORCE/QUADRO GPUS" , Ben Skeggs , Daniel Vetter , Gourav Samaiya Errors-To: nouveau-bounces@lists.freedesktop.org Sender: "Nouveau" On Tue, 23 May 2023 at 19:37, Karol Herbst wrote: > > On Mon, May 22, 2023 at 10:18=E2=80=AFPM Karol Herbst wrote: > > > > This fixes a NULL pointer access inside nvkm_acr_oneinit in case necess= ary > > 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 > > --- > > 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/g= pu/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... with that fixed if you think you need it, Reviewed-by: Dave Airlie > > > nvkm_debug(subdev, "No HSFW(s)\n"); > > nvkm_acr_cleanup(acr); > > return 0; > > -- > > 2.40.1 > > >