Thread (2 messages) 2 messages, 2 authors, 2025-08-19

Re: [BISECTED] NULL pointer dereference while probing sun8i-codec

From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Date: 2025-08-19 01:47:42
Also in: linux-sound, linux-sunxi, lkml

Hi J. Neuschäfer

Thank you for reporting, and sorry for my late response (I was in summer
vacation).
When booting the Allwinner H2+ SoC (Orange Pi Zero) with the audio codec
enabled, recent kernels crash with a NULL pointer dereference:
(snip)
This particular error path is taken after platform_probe returns -EPROBE_DEFER
to call_driver_probe and really_probe calls device_unbind_cleanup.

The parameters to the strcmp call in snd_soc_lookup_component_nolocked are
component->driver->name = NULL and driver_name = "snd_dmaengine_pcm".
Thanks.
I think it is...
	- snd_dmaengine_pcm is sharing same dev with CPU and Platform
	- Platform has driver->name (no problem)
	- CPU doesn't have driver->name (will be NULL pointer access)

I guess your CPU component doesn't have driver->name ?
Anyway, it should care about such case. I will post 2 patches (1st is for
fixup this issue, 2nd is cleanup patch).
Could you please test both patches ?

Thank you for your help !!

Best regards
---
Kuninori Morimoto
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help