Skip to content

[BUG] kernel oops when testing kmod on TGLU_UP_HDA-ipc4 #4731

Closed

Description

@keqiaozhang

Describe the bug
Observed this issue in CI daily test. It happens on TGLU_UP_HDA-IPC4 platform, the reproduction rate is almost 100%. It should be a regression, I will do the bisection next.

dmesg

[ 4679.663002] kernel: snd_sof_intel_hda_common:hda_init_caps: sof-audio-pci-intel-tgl 0000:00:1f.3: skipping SoundWire, no links enabled
[ 4679.663139] kernel: snd_sof_intel_hda:hda_codec_probe: sof-audio-pci-intel-tgl 0000:00:1f.3: HDA codec #0 probed OK: response: 10ec0888
[ 4679.668197] kernel: BUG: kernel NULL pointer dereference, address: 0000000000000078
[ 4679.668202] kernel: #PF: supervisor read access in kernel mode
[ 4679.668204] kernel: #PF: error_code(0x0000) - not-present page
[ 4679.668205] kernel: PGD 0 P4D 0 
[ 4679.668207] kernel: Oops: 0000 [#1] PREEMPT SMP NOPTI
[ 4679.668210] kernel: CPU: 3 PID: 61983 Comm: systemd-udevd Not tainted 6.7.0-rc2-g266ee31b71f8 #dev

To Reproduce
~/sof-test/test-case/check-kmod-load-unload.sh -l 25

Reproduction Rate
100%

Environment

  1. Branch name and commit hash of the 2 repositories: sof (firmware/topology) and linux (kernel driver).
  2. Name of the topology file
    • Topology: {sof-hda-generic-4ch.tplg}
  3. Name of the platform(s) on which the bug is observed.
    • Platform: {TGLU_UP_HDA-ipc4}

dmesg.txt

Activity

  1. added
    bugSomething isn't working
    P1Blocker bugs or important features
    TGLApplies to Tiger Lake platform
    Intel Daily testsThis issue can be found in Intel internal daily tests
    on Dec 5, 2023
  2. ujfalusi commented on Dec 5, 2023

    @ujfalusi
    Collaborator

    Just a hunch:
    3be9a02 ("fixup! ASoC: hdac_hda: Conditionally register dais for HDMI and Analog")

    diff --git a/sound/soc/codecs/hdac_hda.c b/sound/soc/codecs/hdac_hda.c
    index 72916a387ad6..b075689db2dc 100644
    --- a/sound/soc/codecs/hdac_hda.c
    +++ b/sound/soc/codecs/hdac_hda.c
    @@ -619,6 +619,7 @@ static const struct snd_soc_component_driver hdac_hda_hdmi_codec = {
     
     static int hdac_hda_dev_probe(struct hdac_device *hdev)
     {
    +	struct hdac_hda_priv *hda_pvt = dev_get_drvdata(&hdev->dev);
     	struct hdac_ext_link *hlink;
     	int ret;
     
    @@ -631,7 +632,7 @@ static int hdac_hda_dev_probe(struct hdac_device *hdev)
     	snd_hdac_ext_bus_link_get(hdev->bus, hlink);
     
     	/* ASoC specific initialization */
    -	if (snd_hda_device_is_hdmi(hdev))
    +	if (hda_pvt->need_display_power)
     		ret = devm_snd_soc_register_component(&hdev->dev,
     						&hdac_hda_hdmi_codec, hdac_hda_hdmi_dais,
     						ARRAY_SIZE(hdac_hda_hdmi_dais));

    but I cannot reproduce locally.

  3. ujfalusi commented on Dec 5, 2023

    @ujfalusi
    Collaborator

    I can:
    rmmod snd_sof_pci_intel_tgl
    modprobe snd_sof_pci_intel_tgl

  4. ujfalusi commented on Dec 5, 2023

    @ujfalusi
    Collaborator

    it is not that commit, the callstack:

    [ 4679.668236] kernel:  ? __die+0x24/0x70
    [ 4679.668241] kernel:  ? page_fault_oops+0x15b/0x440
    [ 4679.668244] kernel:  ? find_held_lock+0x32/0x90
    [ 4679.668247] kernel:  ? snd_hdac_ext_bus_link_get+0x2b/0xe0 [snd_hda_ext_core]
    [ 4679.668253] kernel:  ? exc_page_fault+0x69/0x1a0
    [ 4679.668256] kernel:  ? asm_exc_page_fault+0x26/0x30
    [ 4679.668261] kernel:  ? hdac_hda_dev_probe+0x48/0xf0 [snd_soc_hdac_hda]
    [ 4679.668265] kernel:  really_probe+0x1a2/0x410
    

    snd_hdac_ext_bus_link_get

  5. ujfalusi commented on Dec 5, 2023

    @ujfalusi
    Collaborator

    I have a tentative fix for it, I'll create a PR before sending upstream.

  6. self-assigned this
    on Dec 5, 2023
  7. 8 remaining items

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

IPC4Intel Daily testsThis issue can be found in Intel internal daily testsP1Blocker bugs or important featuresTGLApplies to Tiger Lake platformbugSomething isn't working

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions