Skip to contentSkip to conversation

stable-rc/linux-5.4.y bisection: baseline.dmesg.alert on meson-g12a-x96-max

DISCUSSION Guillaume Tucker 5 participants 6 messages May 1, 2020 – May 4, 2020 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore
#1 lore raw
In reply to a message not in the archive

Please see the bisection report below about a kernel Oops.

Reports aren't automatically sent to the public while we're trialing new bisection features on kernelci.org but this one looks valid.

The log shows a kernel NULL pointer dereference:

https://storage.kernelci.org/stable-rc/linux-5.4.y/v5.4.36-52-g35bbc55d9e29/arm64/defconfig/gcc-8/lab-baylibre/baseline-meson-g12a-x96-max.html#L1113

The call stack is not the same as in the commit message found by the bisection, so maybe it only fixed part of the problem:

<1>[   16.007376] Unable to handle kernel NULL pointer dereference at virtual address 0000000000000010
<1>[   16.016300] Mem abort info:
<1>[   16.019269]   ESR = 0x96000006
<1>[   16.022571]   EC = 0x25: DABT (current EL), IL = 32 bits
<1>[   16.028075]   SET = 0, FnV = 0
<1>[   16.031356]   EA = 0, S1PTW = 0
<1>[   16.034705] Data abort info:
<1>[   16.037837]   ISV = 0, ISS = 0x00000006
<1>[   16.041876]   CM = 0, WnR = 0
<1>[   16.045128] user pgtable: 4k pages, 48-bit VAs, pgdp=00000000be0f0000
<1>[   16.051702] [0000000000000010] pgd=00000000be117003, pud=00000000be118003, pmd=0000000000000000
<0>[   16.051709] Internal error: Oops: 96000006 [#1] PREEMPT SMP
<4>[   16.133466] CPU: 2 PID: 33 Comm: kworker/2:1 Tainted: G        W         5.4.37-rc1 #1
<4>[   16.141566] Hardware name: Shenzhen Amediatech Technology Co., Ltd X96 Max (DT)
<4>[   16.149087] Workqueue: events deferred_probe_work_func
<4>[   16.154419] pstate: 20000005 (nzCv daif -PAN -UAO)
<4>[   16.159428] pc : snd_soc_dapm_new_dai+0x3c/0x1b0
<4>[   16.164252] lr : snd_soc_dapm_connect_dai_link_widgets+0x114/0x268
<4>[   16.256970] Call trace:
<4>[   16.259647]  snd_soc_dapm_new_dai+0x3c/0x1b0
<4>[   16.264129]  snd_soc_dapm_connect_dai_link_widgets+0x114/0x268
<4>[   16.270167]  snd_soc_instantiate_card+0x858/0xb88
<4>[   16.275083]  snd_soc_register_card+0xf8/0x120
<4>[   16.279656]  devm_snd_soc_register_card+0x40/0x90
<4>[   16.284575]  axg_card_probe+0x9dc/0xaf0 [snd_soc_meson_axg_sound_card]
<4>[   16.291299]  platform_drv_probe+0x50/0xa0
<4>[   16.295524]  really_probe+0xd4/0x328
<4>[   16.299319]  driver_probe_device+0x54/0xe8

...

Guillaume

Quoted 121 lines · kernelci.org bot

* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

* This automated bisection report was sent to you on the basis  *
* that you may be involved with the breaking commit it has      *
* found.  No manual investigation has been done to verify it,   *
* and the root cause of the problem may be somewhere else.      *
*                                                               *
* If you do send a fix, please include this trailer:            *
*   Reported-by: "kernelci.org bot" <[email protected]>          *
*                                                               *
* Hope this helps!                                              *

* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

stable-rc/linux-5.4.y bisection: baseline.dmesg.alert on meson-g12a-x96-max

Summary:

  Start:      35bbc55d9e296 Linux 5.4.37-rc1
  Plain log:  https://storage.kernelci.org/stable-rc/linux-5.4.y/v5.4.36-52-g35bbc55d9e29/arm64/defconfig/gcc-8/lab-baylibre/baseline-meson-g12a-x96-max.txt
  HTML log:   https://storage.kernelci.org/stable-rc/linux-5.4.y/v5.4.36-52-g35bbc55d9e29/arm64/defconfig/gcc-8/lab-baylibre/baseline-meson-g12a-x96-max.html
  Result:     09f4294793bd3 ASoC: meson: axg-card: fix codec-to-codec link setup

Checks:
revert: PASS
verify: PASS

Parameters:

  Tree:       stable-rc
  URL:        https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git
  Branch:     linux-5.4.y
  Target:     meson-g12a-x96-max
  CPU arch:   arm64
  Lab:        lab-baylibre
  Compiler:   gcc-8
  Config:     defconfig
  Test case:  baseline.dmesg.alert

Breaking commit found:

-------------------------------------------------------------------------------
commit 09f4294793bd3e70d68fdab5b392dff18bff62ca

Author: Jerome Brunet <[email protected]>
Date:   Mon Apr 20 13:45:10 2020 +0200
    ASoC: meson: axg-card: fix codec-to-codec link setup
    
    commit 1164284270779e1865cc2046a2a01b58a1e858a9 upstream.
    
    Since the addition of commit 9b5db059366a ("ASoC: soc-pcm: dpcm: Only allow
    playback/capture if supported"), meson-axg cards which have codec-to-codec
    links fail to init and Oops:
    
      Unable to handle kernel NULL pointer dereference at virtual address 0000000000000128
      Internal error: Oops: 96000044 [#1] PREEMPT SMP
      CPU: 3 PID: 1582 Comm: arecord Not tainted 5.7.0-rc1
      pc : invalidate_paths_ep+0x30/0xe0
      lr : snd_soc_dapm_dai_get_connected_widgets+0x170/0x1a8
      Call trace:
       invalidate_paths_ep+0x30/0xe0
       snd_soc_dapm_dai_get_connected_widgets+0x170/0x1a8
       dpcm_path_get+0x38/0xd0
       dpcm_fe_dai_open+0x70/0x920
       snd_pcm_open_substream+0x564/0x840
       snd_pcm_open+0xfc/0x228
       snd_pcm_capture_open+0x4c/0x78
       snd_open+0xac/0x1a8
       ...
    
    While initiliazing the links, ASoC treats the codec-to-codec links of this
    card type as a DPCM backend. This error eventually leads to the Oops.
    
    Most of the card driver code is shared between DPCM backends and
    codec-to-codec links. The property "no_pcm" marking DCPM BE was left set on
    codec-to-codec links, leading to this problem. This commit fixes that.
    
    Fixes: 0a8f1117a680 ("ASoC: meson: axg-card: add basic codec-to-codec link support")
    Signed-off-by: Jerome Brunet <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Mark Brown <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
sound/soc/meson/axg-card.c +3 -2
index 1f698adde506c..2b04ac3d8fd3b 100644
@@ -586,8 +586,10 @@ static int axg_card_add_link(struct snd_soc_card *card, struct device_node *np,
 
 	if (axg_card_cpu_is_tdm_iface(dai_link->cpus->of_node))
 		ret = axg_card_parse_tdm(card, np, index);
-	else if (axg_card_cpu_is_codec(dai_link->cpus->of_node))
+	else if (axg_card_cpu_is_codec(dai_link->cpus->of_node)) {
 		dai_link->params = &codec_params;
+		dai_link->no_pcm = 0; /* link is not a DPCM BE */
+	}
 
 	return ret;
 }
-------------------------------------------------------------------------------

Git bisection log:

-------------------------------------------------------------------------------
git bisect start
# good: [aa73bcc376865c23e61dcebd467697b527901be8] Linux 5.4.36
git bisect good aa73bcc376865c23e61dcebd467697b527901be8
# bad: [35bbc55d9e296d37cf01555d415338b84a70d4c5] Linux 5.4.37-rc1
git bisect bad 35bbc55d9e296d37cf01555d415338b84a70d4c5
# bad: [924f1d37852ff357658c205dd114c70862865fc9] svcrdma: Fix trace point use-after-free race git bisect bad 924f1d37852ff357658c205dd114c70862865fc9
# good: [b848f65436665b5fe675fd3f645c1a458e49f60a] counter: 104-quad-8: Add lock guards - generic interface git bisect good b848f65436665b5fe675fd3f645c1a458e49f60a
# bad: [04b53ed855129c1703d00d8494e4c61309714a99] drivers: soc: xilinx: fix firmware driver Kconfig dependency git bisect bad 04b53ed855129c1703d00d8494e4c61309714a99
# good: [ae886eae0318c71a6125347d6810a1578a83d262] ASoC: tas571x: disable regulators on failed probe git bisect good ae886eae0318c71a6125347d6810a1578a83d262
# bad: [2c0990070379284dda0b51304ce19c2b96e083a2] ASoC: wm8960: Fix wrong clock after suspend & resume git bisect bad 2c0990070379284dda0b51304ce19c2b96e083a2
# bad: [09f4294793bd3e70d68fdab5b392dff18bff62ca] ASoC: meson: axg-card: fix codec-to-codec link setup git bisect bad 09f4294793bd3e70d68fdab5b392dff18bff62ca

# first bad commit: [09f4294793bd3e70d68fdab5b392dff18bff62ca] ASoC: meson: axg-card: fix codec-to-codec link setup
-------------------------------------------------------------------------------
#2 lore raw
Quoted 2 lines · Guillaume Tucker

The call stack is not the same as in the commit message found by the bisection, so maybe it only fixed part of the problem:

No, it is a backport which was fixing an issue that wasn't present in v5.4.

Quoted 1 line
Quoted 1 line

Result: 09f4294793bd3 ASoC: meson: axg-card: fix codec-to-codec link setup

As I said in reply to the AUTOSEL mail:

| > Since the addition of commit 9b5db059366a ("ASoC: soc-pcm: dpcm: Only allow
| > playback/capture if supported"), meson-axg cards which have codec-to-codec
| > links fail to init and Oops:

| This clearly describes the issue as only being present after the above | commit which is not in v5.6.

Probably best that this not be backported.

maintainer
#3 lore raw
Quoted 12 lines · Mark Brown
Quoted 2 lines · Guillaume Tucker

The call stack is not the same as in the commit message found by the bisection, so maybe it only fixed part of the problem:

No, it is a backport which was fixing an issue that wasn't present in v5.4.

Quoted 1 line
Quoted 1 line

Result: 09f4294793bd3 ASoC: meson: axg-card: fix codec-to-codec link setup

As I said in reply to the AUTOSEL mail:

Quoted 8 lines
| > Since the addition of commit 9b5db059366a ("ASoC: soc-pcm: dpcm: Only allow
| > playback/capture if supported"), meson-axg cards which have codec-to-codec
| > links fail to init and Oops:

| This clearly describes the issue as only being present after the above | commit which is not in v5.6.

Probably best that this not be backported.

Hrm... But I never queued that commit... I wonder what's up.

Signature · 2 lines
Thanks,
Sasha
#4 lore raw
Quoted 17 lines · Sasha Levin
Quoted 16 lines · Mark Brown
Quoted 2 lines · Guillaume Tucker

The call stack is not the same as in the commit message found by the bisection, so maybe it only fixed part of the problem:

No, it is a backport which was fixing an issue that wasn't present in v5.4.

Quoted 1 line
Quoted 1 line

Result: 09f4294793bd3 ASoC: meson: axg-card: fix codec-to-codec link setup

As I said in reply to the AUTOSEL mail:

| > Since the addition of commit 9b5db059366a ("ASoC: soc-pcm: dpcm: Only allow
| > playback/capture if supported"), meson-axg cards which have codec-to-codec
| > links fail to init and Oops:
Quoted 6 lines
Quoted 4 lines

| This clearly describes the issue as only being present after the above | commit which is not in v5.6.

Probably best that this not be backported.

Hrm... But I never queued that commit... I wonder what's up.

I saw the Fixes: tag, but missed the changelog text. My fault.

I'll go drop it from everywhere, sorry about that.

greg k-h

reviewer
#5 lore raw
Quoted 23 lines · Greg Kroah-Hartman
Quoted 22 lines · Sasha Levin
Quoted 20 lines · Mark Brown
Quoted 2 lines · Guillaume Tucker

The call stack is not the same as in the commit message found by the bisection, so maybe it only fixed part of the problem:

No, it is a backport which was fixing an issue that wasn't present in v5.4.

Quoted 1 line
Quoted 1 line

Result: 09f4294793bd3 ASoC: meson: axg-card: fix codec-to-codec link setup

As I said in reply to the AUTOSEL mail:

| > Since the addition of commit 9b5db059366a ("ASoC: soc-pcm: dpcm: Only allow
| > playback/capture if supported"), meson-axg cards which have codec-to-codec
| > links fail to init and Oops:

| This clearly describes the issue as only being present after the above | commit which is not in v5.6.

Probably best that this not be backported.

Quoted 7 lines
Quoted 1 line

Hrm... But I never queued that commit... I wonder what's up.

I saw the Fixes: tag, but missed the changelog text. My fault.

I'll go drop it from everywhere, sorry about that.

greg k-h

Hi everyone,

Sorry for the mess this seems to have triggered.

Indeed, with the Fixes tag, I understand why the patch has been picked up. Even I thought that a backport would be OK, since the mistake was quite old.

If I had wrote it correctly from the start, I would have found the problem that was waiting for us in ASoC ... but the 2 errors cancelled each other out.

It is only now that ASoC has been fixed that we found my mistake.

Again, sorry for the mess.
Thanks a lot for your time and effort on this

#6 lore raw
In reply to Greg Kroah-Hartman
Quoted 7 lines · Greg Kroah-Hartman
Quoted 4 lines · Sasha Levin
Quoted 4 lines
Quoted 1 line
Quoted 1 line

Result: 09f4294793bd3 ASoC: meson: axg-card: fix codec-to-codec link setup

| This clearly describes the issue as only being present after the above | commit which is not in v5.6.

Quoted 7 lines
Quoted 3 lines
Quoted 1 line

Probably best that this not be backported.

Hrm... But I never queued that commit... I wonder what's up.

I saw the Fixes: tag, but missed the changelog text. My fault.

I'll go drop it from everywhere, sorry about that.

Ah, that explains it - thanks for sorting this out.