From: Thorsten Blum <thorsten.blum@linux.dev>
To: Dave Stevenson <dave.stevenson@raspberrypi.com>
Cc: "Maxime Ripard" <mripard@kernel.org>,
"Maíra Canal" <mcanal@igalia.com>,
"Raspberry Pi Kernel Maintenance" <kernel-list@raspberrypi.com>,
"Maarten Lankhorst" <maarten.lankhorst@linux.intel.com>,
"Thomas Zimmermann" <tzimmermann@suse.de>,
"David Airlie" <airlied@gmail.com>,
"Simona Vetter" <simona@ffwll.ch>,
"Eric Anholt" <eric@anholt.net>,
stable@vger.kernel.org, "Simona Vetter" <simona.vetter@ffwll.ch>,
dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] drm/vc4: fix NULL dereference in vc4_hvs_unbind
Date: Tue, 5 May 2026 11:34:36 +0200 [thread overview]
Message-ID: <afm5rE1i3D-Uk3S7@linux.dev> (raw)
In-Reply-To: <CAPY8ntDOEjAHFF_HxFoVEmrgQ8okm=8cHQEfm2QUU=MuB77d_A@mail.gmail.com>
Hi Dave,
On Tue, May 05, 2026 at 09:54:53AM +0100, Dave Stevenson wrote:
> Hi Thorsten
>
> On Sat, 2 May 2026 at 13:13, Thorsten Blum <thorsten.blum@linux.dev> wrote:
> >
> > With 'dtoverlay=vc4-kms-v3d,noaudio' and 'hdmi=off' on Raspberry Pi,
>
> Mainline doesn't use overlays, so this description isn't valid.
>
> Which generation of Pi are you using? Whilst they all share the vc4
> driver, the functionality associated differs. If you're disabling HDMI
> (and HDMI audio), which display outputs are you using?
It's a Pi 500 currently running headless, which is why I turned audio
and HDMI off. I ended up using:
dtparam=audio=off
#dtoverlay=vc4-kms-v3d
hdmi=off
This prevents the vc4 and snd modules from loading and works for me.
> > unloading the vc4 module calls vc4_hvs_unbind() with
> > dev_get_drvdata(master) returning NULL.
> >
> > Return early when 'drm' is NULL before converting it to 'vc4' and before
> > dereferencing 'vc4->hvs', preventing a kernel oops.
>
> That leaves things allocated and clocks running, so bailing out isn't a fix.
> I'll have a look to see why dev_get_drvdata is returning NULL.
Yes, I realized there are probably other things that need to be fixed.
However, the defensive NULL check avoided the kernel oops for me.
Thanks,
Thorsten
next prev parent reply other threads:[~2026-05-05 9:34 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-02 12:12 [PATCH] drm/vc4: fix NULL dereference in vc4_hvs_unbind Thorsten Blum
2026-05-05 8:54 ` Dave Stevenson
2026-05-05 9:34 ` Thorsten Blum [this message]
2026-05-05 15:04 ` Dave Stevenson
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=afm5rE1i3D-Uk3S7@linux.dev \
--to=thorsten.blum@linux.dev \
--cc=airlied@gmail.com \
--cc=dave.stevenson@raspberrypi.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=eric@anholt.net \
--cc=kernel-list@raspberrypi.com \
--cc=linux-kernel@vger.kernel.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mcanal@igalia.com \
--cc=mripard@kernel.org \
--cc=simona.vetter@ffwll.ch \
--cc=simona@ffwll.ch \
--cc=stable@vger.kernel.org \
--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