Re: drm/vc4: NULL ptr dereference during HDMI audio registration with next-20190111

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> Stefan Wahren <stefan.wahren@xxxxxxxx> hat am 12. Januar 2019 um 12:24 geschrieben:
> 
> 
> Hi,
> 
> kernelci.org [1] noticed a NULL pointer dereference during HDMI audio registration with linux-next-20190111 on Raspberry Pi using bcm2835_defconfig. I was able to reproduce it, but couldn't find anything suspicious in the commit ("Merge remote-tracking branch 'drm-misc-fixes/for-linux-next-fixes'") bisected by kernelci.org.
> 
> Best regards
> Stefan
> 
> [1] - https://kernelci.org/boot/id/5c383ceb59b514d9ca6edd2f/
> 
> [    1.956798] Unable to handle kernel NULL pointer dereference at virtual address 00000000

okay, i think i've found the responsible commit 8780cf1142a5 ("ASoC: soc-core: defer card probe until all component is added to list").

The following patch fixes the issue for me:

diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index 0934b36..dc6b6d1 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -1134,7 +1134,8 @@ static int soc_init_dai_link(struct snd_soc_card *card,
 	 * Defer card registartion if platform dai component is not added to
 	 * component list.
 	 */
-	if (!soc_find_component(link->platform->of_node, link->platform->name))
+	if ((link->platform->of_node || link->platform->name) &&
+	    !soc_find_component(link->platform->of_node, link->platform->name))
 		return -EPROBE_DEFER;
 
 	/*
@@ -1153,7 +1154,8 @@ static int soc_init_dai_link(struct snd_soc_card *card,
 	 * Defer card registartion if cpu dai component is not added to
 	 * component list.
 	 */
-	if (!soc_find_component(link->cpu_of_node, link->cpu_name))
+	if ((link->cpu_of_node || link->cpu_name) &&
+	    !soc_find_component(link->cpu_of_node, link->cpu_name))
 		return -EPROBE_DEFER;
 
 	/*
-- 
2.7.4
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux