On Fri 17 Apr 2020 at 14:27, Mark Brown <broonie@xxxxxxxxxx> wrote: > On Fri, Apr 17, 2020 at 02:53:36AM -0700, kernelci.org bot wrote: > >> next/master bisection: baseline.dmesg.alert on meson-sm1-sei610 > >> Summary: >> Start: a3ca59b9af21e Add linux-next specific files for 20200416 >> Plain log: https://storage.kernelci.org//next/master/next-20200416/arm64/defconfig+CONFIG_RANDOMIZE_BASE=y/gcc-8/lab-baylibre/baseline-meson-sm1-sei610.txt >> HTML log: https://storage.kernelci.org//next/master/next-20200416/arm64/defconfig+CONFIG_RANDOMIZE_BASE=y/gcc-8/lab-baylibre/baseline-meson-sm1-sei610.html >> Result: 9b5db059366ae ASoC: soc-pcm: dpcm: Only allow playback/capture if supported > > This change to check the playback and capture constraints is also > causing issues on at least Meson - I'm a bit worried that this is also > causing oopses here, not just audio problems so copying in Morimoto-san > too. We should fix the things that are broken by this change since it's > a thing we should be able to rely on and do enforce for non-DPCm links > but I'm wondering if we should revert for 5.7 and reapply for 5.8. > > Including complete report so people have it. > I have the device with me. I'll check an report back >> Checks: >> revert: PASS >> verify: PASS > >> Parameters: >> Tree: next >> URL: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git >> Branch: master >> Target: meson-sm1-sei610 >> CPU arch: arm64 >> Lab: lab-baylibre >> Compiler: gcc-8 >> Config: defconfig+CONFIG_RANDOMIZE_BASE=y >> Test case: baseline.dmesg.alert >> >> Breaking commit found: >> >> ------------------------------------------------------------------------------- >> commit 9b5db059366ae2087e07892b5fc108f81f4ec189 >> Author: Stephan Gerhold <stephan@xxxxxxxxxxx> >> Date: Wed Apr 15 12:49:28 2020 +0200 >> >> ASoC: soc-pcm: dpcm: Only allow playback/capture if supported >> >> At the moment, PCM devices for DPCM are only created based on the >> dpcm_playback/capture parameters of the DAI link, without considering >> if the CPU/FE DAI is actually capable of playback/capture. >> >> Normally the dpcm_playback/capture parameter should match the >> capabilities of the CPU DAI. However, there is no way to set that >> parameter from the device tree (e.g. with simple-audio-card or >> qcom sound cards). dpcm_playback/capture are always both set to 1. >> >> This causes problems when the CPU DAI does only support playback >> or capture. Attemting to open that PCM device with an unsupported >> stream type then results in a null pointer dereference: >> >> 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 >> ... >> >> ... because the DAI playback/capture_widget is not set in that case. >> >> We could add checks there to fix the problem (maybe we should >> anyway), but much easier is to not expose the device as >> playback/capture in the first place. Attemting to use that >> device would always fail later anyway. >> >> Add checks for snd_soc_dai_stream_valid() to the DPCM case >> to avoid exposing playback/capture if it is not supported. >> >> Signed-off-by: Stephan Gerhold <stephan@xxxxxxxxxxx> >> Link: https://lore.kernel.org/r/20200415104928.86091-1-stephan@xxxxxxxxxxx >> Signed-off-by: Mark Brown <broonie@xxxxxxxxxx> >> >> diff --git a/sound/soc/soc-pcm.c b/sound/soc/soc-pcm.c >> index 289aebc155293..1f302de440525 100644 >> --- a/sound/soc/soc-pcm.c >> +++ b/sound/soc/soc-pcm.c >> @@ -2911,8 +2911,17 @@ int soc_new_pcm(struct snd_soc_pcm_runtime *rtd, int num) >> int i; >> >> if (rtd->dai_link->dynamic || rtd->dai_link->no_pcm) { >> - playback = rtd->dai_link->dpcm_playback; >> - capture = rtd->dai_link->dpcm_capture; >> + cpu_dai = asoc_rtd_to_cpu(rtd, 0); >> + if (rtd->num_cpus > 1) { >> + dev_err(rtd->dev, >> + "DPCM doesn't support Multi CPU yet\n"); >> + return -EINVAL; >> + } >> + >> + playback = rtd->dai_link->dpcm_playback && >> + snd_soc_dai_stream_valid(cpu_dai, SNDRV_PCM_STREAM_PLAYBACK); >> + capture = rtd->dai_link->dpcm_capture && >> + snd_soc_dai_stream_valid(cpu_dai, SNDRV_PCM_STREAM_CAPTURE); >> } else { >> /* Adapt stream for codec2codec links */ >> int cpu_capture = rtd->dai_link->params ? >> ------------------------------------------------------------------------------- >> >> >> Git bisection log: >> >> ------------------------------------------------------------------------------- >> git bisect start >> # good: [87b0f983f66f23762921129fd35966eddc3f2dae] net: mscc: ocelot: fix untagged packet drops when enslaving to vlan aware bridge >> git bisect good 87b0f983f66f23762921129fd35966eddc3f2dae >> # bad: [a3ca59b9af21e68069555ffff1ad89bd2a7c40fc] Add linux-next specific files for 20200416 >> git bisect bad a3ca59b9af21e68069555ffff1ad89bd2a7c40fc >> # bad: [feb09551bfe34ccf0ba462188a1aee651be0f2c3] Merge remote-tracking branch 'i2c/i2c/for-next' >> git bisect bad feb09551bfe34ccf0ba462188a1aee651be0f2c3 >> # good: [a4721ced760684d1776bf31f7925aa41bb3f4846] Merge v5.7-rc1 into drm-misc-fixes >> git bisect good a4721ced760684d1776bf31f7925aa41bb3f4846 >> # bad: [e75043c693af6a10c9e2087adeef243cf05ce3bd] Merge remote-tracking branch 'rockchip/for-next' >> git bisect bad e75043c693af6a10c9e2087adeef243cf05ce3bd >> # bad: [08a315860a1b462fef5969d2e6ab4cdab26df8e3] Merge remote-tracking branch 'arm-soc/for-next' >> git bisect bad 08a315860a1b462fef5969d2e6ab4cdab26df8e3 >> # bad: [80dbfa57508c36c2b3798b387ef3eb92954b9c09] Merge remote-tracking branch 'slave-dma-fixes/fixes' >> git bisect bad 80dbfa57508c36c2b3798b387ef3eb92954b9c09 >> # good: [a723380c6f0a3723db72da6c6097b32b23f5564c] Merge remote-tracking branch 'sound-current/for-linus' >> git bisect good a723380c6f0a3723db72da6c6097b32b23f5564c >> # bad: [5bd70440cb0a6f5c6a84019bb2aa93ab8310a5cd] ASoC: soc-dai: revert all changes to DAI startup/shutdown sequence >> git bisect bad 5bd70440cb0a6f5c6a84019bb2aa93ab8310a5cd >> # good: [4d1a015a203c0249e3332ea217a38ec978118daa] ASoC: convert rockchip spdif bindings to yaml >> git bisect good 4d1a015a203c0249e3332ea217a38ec978118daa >> # good: [0f2a3b02274c02eb97697c4d89c019d1d21ac225] ASoC: wsa881x: mark read_only_wordlength flag >> git bisect good 0f2a3b02274c02eb97697c4d89c019d1d21ac225 >> # good: [aa7812737f2877e192d57626cbe8825cc7cf6de9] ASoC: sgtl5000: Fix VAG power-on handling >> git bisect good aa7812737f2877e192d57626cbe8825cc7cf6de9 >> # bad: [0c824ec094b5cda766c80d88c2036e28c24a4cb1] ASoC: q6dsp6: q6afe-dai: add missing channels to MI2S DAIs >> git bisect bad 0c824ec094b5cda766c80d88c2036e28c24a4cb1 >> # bad: [9b5db059366ae2087e07892b5fc108f81f4ec189] ASoC: soc-pcm: dpcm: Only allow playback/capture if supported >> git bisect bad 9b5db059366ae2087e07892b5fc108f81f4ec189 >> # first bad commit: [9b5db059366ae2087e07892b5fc108f81f4ec189] ASoC: soc-pcm: dpcm: Only allow playback/capture if supported >> -------------------------------------------------------------------------------