mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jonathan Kuehn <jonathan.kuehn@aol.com>
To: lyude@redhat.com
Cc: dakr@kernel.org, maarten.lankhorst@linux.intel.com,
	mripard@kernel.org, tzimmermann@suse.de, airlied@gmail.com,
	simona@ffwll.ch, airlied@redhat.com,
	dri-devel@lists.freedesktop.org, nouveau@lists.freedesktop.org,
	linux-kernel@vger.kernel.org,
	Jonathan Kuehn <jonathan.kuehn@aol.com>
Subject: [PATCH] GPU: drm: nouveau: Prevent kernel oops on missing firmware binary
Date: Thu,  5 Nov 2026 21:27:57 +0100	[thread overview]
Message-ID: <20261105202757.28703-1-jonathan.kuehn@aol.com> (raw)
In-Reply-To: <20261105202757.28703-1-jonathan.kuehn.ref@aol.com>

Prevent null pointer dereference at the call of
nouveau_abi16_ioctl_getparams with parameter
NOUVEAU_GETPARAM_GRAPH_UNITS when firmware binaries are missing.
Fixes crash for certain user-space applications (steamwebhelper,
signal-desktop).

Signed-off-by: Jonathan Kuehn <jonathan.kuehn@aol.com>
---
 drivers/gpu/drm/nouveau/nvkm/engine/gr/base.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/gr/base.c b/drivers/gpu/drm/nouveau/nvkm/engine/gr/base.c
index cd4908b1b4df..9abeb9732406 100644
--- a/drivers/gpu/drm/nouveau/nvkm/engine/gr/base.c
+++ b/drivers/gpu/drm/nouveau/nvkm/engine/gr/base.c
@@ -72,7 +72,7 @@ nvkm_gr_tile(struct nvkm_engine *engine, int region, struct nvkm_fb_tile *tile)
 u64
 nvkm_gr_units(struct nvkm_gr *gr)
 {
-	if (gr->func->units)
+	if (gr && gr->func->units)
 		return gr->func->units(gr);
 	return 0;
 }
-- 
2.47.3


           reply	other threads:[~2026-11-05 20:31 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <20261105202757.28703-1-jonathan.kuehn.ref@aol.com>]

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=20261105202757.28703-1-jonathan.kuehn@aol.com \
    --to=jonathan.kuehn@aol.com \
    --cc=airlied@gmail.com \
    --cc=airlied@redhat.com \
    --cc=dakr@kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lyude@redhat.com \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=mripard@kernel.org \
    --cc=nouveau@lists.freedesktop.org \
    --cc=simona@ffwll.ch \
    --cc=tzimmermann@suse.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

all inboxes | Powered by JetHome®