lkml.org 
[lkml]   [2026]   [May]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] drm/vc4: fix NULL dereference in vc4_hvs_unbind
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

\
 
 \ /
  Last update: 2026-05-05 11:36    [W:0.066 / U:5.215 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and my Meterkast|Read the blog