Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

kernel oops on ICL when removing sof-pci-dev after failed firmware boot #945

Closed
plbossart opened this issue May 14, 2019 · 2 comments
Closed
Assignees
Labels
bug Something isn't working ICL Applies to Icelake platform

Comments

@plbossart
Copy link
Member

More issues with bad error handling. In this case the firmware boot issue is expected but that shouldn't lead to a kernel bug.

[   45.967675] sof-audio-pci 0000:00:1f.3: PCI DSP detected
[   45.967730] sof-audio-pci 0000:00:1f.3: enabling device (0000 -> 0002)
[   45.968311] sof-audio-pci 0000:00:1f.3: warning: No matching ASoC machine driver found
[   45.968320] sof-audio-pci 0000:00:1f.3: DSP detected with PCI class/subclass/prog-if 0x040100
[   45.968413] sof-audio-pci 0000:00:1f.3: checking for capabilities at offset 0xc00
[   45.968415] sof-audio-pci 0000:00:1f.3: found ML capability at 0xc00
[   45.968437] sof-audio-pci 0000:00:1f.3: checking for capabilities at offset 0x800
[   45.968438] sof-audio-pci 0000:00:1f.3: found DSP capability at 0x800
[   45.968460] sof-audio-pci 0000:00:1f.3: checking for capabilities at offset 0x500
[   45.968461] sof-audio-pci 0000:00:1f.3: found GTS capability at 0x500
[   45.968476] sof-audio-pci 0000:00:1f.3: checking for capabilities at offset 0x1f00
[   45.968477] sof-audio-pci 0000:00:1f.3: found DRSM capability at 0x1f00
[   45.968492] sof-audio-pci 0000:00:1f.3: checking for capabilities at offset 0x700
[   45.968493] sof-audio-pci 0000:00:1f.3: found SPIB capability at 0x700
[   45.968509] sof-audio-pci 0000:00:1f.3: DMA mask is 64 bit
[   45.968521] sof-audio-pci 0000:00:1f.3: hda global caps = 0x1009701
[   45.968522] sof-audio-pci 0000:00:1f.3: detected 9 playback and 7 capture streams
[   45.968758] sof-audio-pci 0000:00:1f.3: use msi interrupt mode
[   45.968760] sof-audio-pci 0000:00:1f.3: using HDA IRQ 140
[   45.968822] sdhci-pci 0000:00:14.5: SDHCI controller found [8086:34f8] (rev 10)
[   45.981227] sof-audio-pci 0000:00:1f.3: using IPC IRQ 140
[   45.994377] sof-audio-pci 0000:00:1f.3: Debug PCIR: 00000000 at  00000044
[   45.994388] sof-audio-pci 0000:00:1f.3: PP capability, will probe DSP later.
[   45.994587] sof-audio-pci 0000:00:1f.3: bound 0000:00:02.0 (ops 0xffffffffb88a2140)
[   45.994592] sof-audio-pci 0000:00:1f.3: Turning i915 HDAC power on
[   45.994610] sof-audio-pci 0000:00:1f.3: Debug PCIR: 00000040 at  00000048
[   45.994626] sof-audio-pci 0000:00:1f.3: Debug PCIW: 00000000 at  00000048
[   45.998513] sof-audio-pci 0000:00:1f.3: Debug PCIR: 00000000 at  00000048
[   45.998551] sof-audio-pci 0000:00:1f.3: Debug PCIW: 00000040 at  00000048
[   45.998552] sof-audio-pci 0000:00:1f.3: hda codecs found, mask 4
[   45.998553] sof-audio-pci 0000:00:1f.3: using HDA machine driver skl_hda_dsp_generic now
[   45.998698] sof-audio-pci 0000:00:1f.3: HDA codec #2 probed OK: response: 8086280f
[   45.999892] sof-audio-pci 0000:00:1f.3: Turning i915 HDAC power off
[   46.001489] sof-audio-pci 0000:00:1f.3: Debug PCIR: 00000040 at  00000048
[   46.001526] sof-audio-pci 0000:00:1f.3: loading firmware
[   46.002711] sof-audio-pci 0000:00:1f.3: Debug PCIR: 00000002 at  00000048
[   46.002724] sof-audio-pci 0000:00:1f.3: Debug PCIW: 00000000 at  00000048
[   46.002761] sof-audio-pci 0000:00:1f.3: Debug PCIR: 00000000 at  00000044
[   46.002786] sof-audio-pci 0000:00:1f.3: Debug PCIW: 00000004 at  00000044
[   46.002787] sof-audio-pci 0000:00:1f.3: booting DSP firmware
[   46.002991] sof-audio-pci 0000:00:1f.3: period_bytes:0x0
[   46.002992] sof-audio-pci 0000:00:1f.3: periods:1
[   46.003151] sof-audio-pci 0000:00:1f.3: FW Poll Status: reg=0xf0f0f0f successful
[   46.003250] sof-audio-pci 0000:00:1f.3: FW Poll Status: reg=0xf0f0f0e successful
[   46.003262] sof-audio-pci 0000:00:1f.3: unstall/run core: core_mask = 1
[   46.003288] sof-audio-pci 0000:00:1f.3: DSP core(s) enabled? 1 : core_mask 1
[   46.003838] sof-audio-pci 0000:00:1f.3: FW Poll Status: reg=0x80000000 successful
[   46.003867] sof-audio-pci 0000:00:1f.3: FW Poll Status: reg=0x1010e0e successful
[   46.003911] sof-audio-pci 0000:00:1f.3: FW Poll Status: reg=0x6000021 successful
[   46.004104] sof-audio-pci 0000:00:1f.3: unexpected ipc interrupt raised!
[   46.004112] sof-audio-pci 0000:00:1f.3: error: no reply expected, received 0x0
[   46.037316] sdhci-pci 0000:00:14.5: SDHCI controller found [8086:34f8] (rev 10)
[   46.063819] HDMI HDA Codec ehdaudio0D2: Max dais supported: 3
[   46.064218] sdhci-pci 0000:00:14.5: SDHCI controller found [8086:34f8] (rev 10)
[   49.004731] sof-audio-pci 0000:00:1f.3: FW Poll Status: reg=0x80000012 timedout
[   49.004762] sof-audio-pci 0000:00:1f.3: error: load fw failed ret: -110
[   49.004828] sof-audio-pci 0000:00:1f.3: unknown ROM status value 80000012
[   49.004865] sof-audio-pci 0000:00:1f.3: error: status = 0x0000002c panic = 0x00000000
[   49.004882] sof-audio-pci 0000:00:1f.3: unknown ROM status value 80000012
[   49.004889] sof-audio-pci 0000:00:1f.3: error: failed to reset DSP
[   49.004891] sof-audio-pci 0000:00:1f.3: error: failed to boot DSP firmware -110
[   49.055751] sof-audio-pci 0000:00:1f.3: FW Poll Status: reg=0x1d003c timedout
[   49.055781] sof-audio-pci 0000:00:1f.3: error: reset enter failed: core_mask f adspcs 0x1d003c
[   49.055793] sof-audio-pci 0000:00:1f.3: error: dsp core reset failed: core_mask f
[   49.060782] sof-audio-pci 0000:00:1f.3: Turning i915 HDAC power off
[   49.060825] sof-audio-pci 0000:00:1f.3: error: sof_probe_work failed err: -110
[  559.458818] cfagent (3063) used greatest stack depth: 12128 bytes left
[ 1068.041045] BUG: unable to handle kernel paging request at 0000000100000001
[ 1068.041057] #PF error: [WRITE]
[ 1068.041059] PGD 0 P4D 0 
[ 1068.041064] Oops: 0002 [#1] SMP PTI
[ 1068.041068] CPU: 6 PID: 3513 Comm: rmmod Tainted: G        W         5.1.0-test+ #78
[ 1068.041074] Hardware name: Intel Corporation Ice Lake Client Platform/IceLake Y LPDDR4x T4 RVP TLC, BIOS ICLSFWR1.R00.3023.A01.1901100101 01/10/2019
[ 1068.041082] RIP: 0010:__mutex_lock.isra.9+0xe6/0x4c0
[ 1068.041085] Code: 00 00 48 39 c6 0f 84 82 03 00 00 49 8d 47 10 48 8d 5d a0 48 89 c7 48 89 45 80 49 8b 47 18 48 89 7d a0 49 89 5f 18 48 89 45 a8 <48> 89 18 49 39 5f 10 0f 84 6a 03 00 00 65 48 8b 14 25 40 4d 01 00
[ 1068.041087] RSP: 0018:ffffaf244181fd60 EFLAGS: 00010297
[ 1068.041101] RAX: 0000000100000001 RBX: ffffaf244181fd80 RCX: 00000000c0000100
[ 1068.041102] RDX: ffffaf2441acbd18 RSI: ffff9dec2d030000 RDI: ffff9dec54af6040
[ 1068.041104] RBP: ffffaf244181fde0 R08: ffff9dec2d030098 R09: ffff9dec2d030080
[ 1068.041105] R10: ffffaf2440f87df0 R11: 0000000000000001 R12: 0000000000000002
[ 1068.041107] R13: ffffffffc02cc000 R14: ffff9dec54af6038 R15: ffff9dec54af6030
[ 1068.041113] FS:  00007ff627ed9b80(0000) GS:ffff9dec5bf80000(0000) knlGS:0000000000000000
[ 1068.041114] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 1068.041116] CR2: 0000000100000001 CR3: 00000002729cc004 CR4: 0000000000760ee0
[ 1068.041117] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[ 1068.041119] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
[ 1068.041120] PKRU: 55555554
[ 1068.041121] Call Trace:
[ 1068.041134]  ? __cancel_work_timer+0x11f/0x1a0
[ 1068.041144]  ? snd_sof_ipc_free+0x15/0x30 [snd_sof]
[ 1068.041147]  snd_sof_ipc_free+0x15/0x30 [snd_sof]
[ 1068.041155]  snd_sof_device_remove+0x2c/0x90 [snd_sof]
[ 1068.041158]  sof_pci_remove+0x10/0x20 [sof_pci_dev]
[ 1068.041162]  pci_device_remove+0x36/0xb0
[ 1068.041167]  device_release_driver_internal+0xdf/0x1d0
[ 1068.041170]  driver_detach+0x36/0x70
[ 1068.041173]  bus_remove_driver+0x4c/0xc0
[ 1068.041176]  pci_unregister_driver+0x1d/0x90
[ 1068.041182]  __x64_sys_delete_module+0x155/0x240
[ 1068.041186]  do_syscall_64+0x43/0xf0
[ 1068.041190]  entry_SYSCALL_64_after_hwframe+0x44/0xa9
[ 1068.041193] RIP: 0033:0x7ff62801d6f7
[ 1068.041194] Code: 73 01 c3 48 8b 0d 99 87 0c 00 f7 d8 64 89 01 48 83 c8 ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 b8 b0 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d 69 87 0c 00 f7 d8 64 89 01 48
[ 1068.041196] RSP: 002b:00007ffde708c3b8 EFLAGS: 00000206 ORIG_RAX: 00000000000000b0
[ 1068.041198] RAX: ffffffffffffffda RBX: 0000563e8d4f37a0 RCX: 00007ff62801d6f7
[ 1068.041200] RDX: 000000000000000a RSI: 0000000000000800 RDI: 0000563e8d4f3808
[ 1068.041203] RBP: 0000000000000000 R08: 00007ffde708b331 R09: 0000000000000000
[ 1068.041204] R10: 00007ff628096ae0 R11: 0000000000000206 R12: 00007ffde708c5e0
[ 1068.041205] R13: 00007ffde708e73f R14: 0000563e8d4f2260 R15: 0000563e8d4f37a0
[ 1068.041207] Modules linked in: snd_soc_hdac_hdmi snd_soc_dmic sof_pci_dev(-) snd_sof_intel_hda_common snd_soc_hdac_hda snd_sof_intel_hda snd_sof_intel_byt snd_soc_acpi_intel_match snd_sof_intel_ipc snd_sof snd_sof_xtensa_dsp snd_soc_acpi snd_hda_ext_core snd_soc_core snd_hda_codec snd_hwdep snd_hda_core snd_pcm x86_pkg_temp_thermal intel_powerclamp asix usbnet mei_me mei iwlwifi efivarfs sdhci_pci intel_lpss_pci xhci_pci cqhci intel_lpss mfd_core sdhci xhci_hcd
[ 1068.041237] CR2: 0000000100000001
[ 1068.041246] ---[ end trace f699535dfbf8569d ]---
[ 1068.041249] RIP: 0010:__mutex_lock.isra.9+0xe6/0x4c0
[ 1068.041251] Code: 00 00 48 39 c6 0f 84 82 03 00 00 49 8d 47 10 48 8d 5d a0 48 89 c7 48 89 45 80 49 8b 47 18 48 89 7d a0 49 89 5f 18 48 89 45 a8 <48> 89 18 49 39 5f 10 0f 84 6a 03 00 00 65 48 8b 14 25 40 4d 01 00
[ 1068.041252] RSP: 0018:ffffaf244181fd60 EFLAGS: 00010297
[ 1068.041254] RAX: 0000000100000001 RBX: ffffaf244181fd80 RCX: 00000000c0000100
[ 1068.041256] RDX: ffffaf2441acbd18 RSI: ffff9dec2d030000 RDI: ffff9dec54af6040
[ 1068.041268] RBP: ffffaf244181fde0 R08: ffff9dec2d030098 R09: ffff9dec2d030080
[ 1068.041269] R10: ffffaf2440f87df0 R11: 0000000000000001 R12: 0000000000000002
[ 1068.041271] R13: ffffffffc02cc000 R14: ffff9dec54af6038 R15: ffff9dec54af6030
[ 1068.041272] FS:  00007ff627ed9b80(0000) GS:ffff9dec5bf80000(0000) knlGS:0000000000000000
[ 1068.041274] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 1068.041275] CR2: 0000000100000001 CR3: 00000002729cc004 CR4: 0000000000760ee0
[ 1068.041276] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[ 1068.041281] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
[ 1068.041282] PKRU: 55555554
@plbossart plbossart added the ICL Applies to Icelake platform label May 14, 2019
plbossart added a commit to plbossart/sound that referenced this issue May 14, 2019
In some configurations, it's a requirement to split the probe in two,
with a second part handled in a workqueue (e.g. for HDMI support
which depends on the DRM modules).

SOF already handles these configurations but the error flow is
incorrect. When an error occurs in the workqueue, the probe has
technically already completed. If we release the resources on errors,
this generates kernel oops/use-after-free when the resources are
released a second time on module removal.

GitHub issue: thesofproject#945
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
plbossart added a commit that referenced this issue May 15, 2019
In some configurations, it's a requirement to split the probe in two,
with a second part handled in a workqueue (e.g. for HDMI support
which depends on the DRM modules).

SOF already handles these configurations but the error flow is
incorrect. When an error occurs in the workqueue, the probe has
technically already completed. If we release the resources on errors,
this generates kernel oops/use-after-free when the resources are
released a second time on module removal.

GitHub issue: #945
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
bardliao pushed a commit that referenced this issue May 16, 2019
In some configurations, it's a requirement to split the probe in two,
with a second part handled in a workqueue (e.g. for HDMI support
which depends on the DRM modules).

SOF already handles these configurations but the error flow is
incorrect. When an error occurs in the workqueue, the probe has
technically already completed. If we release the resources on errors,
this generates kernel oops/use-after-free when the resources are
released a second time on module removal.

GitHub issue: #945
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
@mengdonglin mengdonglin added the bug Something isn't working label May 16, 2019
@zhuyingjiang
Copy link

@plbossart this issue is already fixed by #946?

@plbossart
Copy link
Member Author

yes, we can close this.

plbossart added a commit to plbossart/sound that referenced this issue May 21, 2019
In some configurations, it's a requirement to split the probe in two,
with a second part handled in a workqueue (e.g. for HDMI support
which depends on the DRM modules).

SOF already handles these configurations but the error flow is
incorrect. When an error occurs in the workqueue, the probe has
technically already completed. If we release the resources on errors,
this generates kernel oops/use-after-free when the resources are
released a second time on module removal.

GitHub issue: thesofproject#945
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
plbossart added a commit that referenced this issue May 24, 2019
In some configurations, it's a requirement to split the probe in two,
with a second part handled in a workqueue (e.g. for HDMI support
which depends on the DRM modules).

SOF already handles these configurations but the error flow is
incorrect. When an error occurs in the workqueue, the probe has
technically already completed. If we release the resources on errors,
this generates kernel oops/use-after-free when the resources are
released a second time on module removal.

GitHub issue: #945
Fixes: c16211d ("ASoC: SOF: Add Sound Open Firmware driver core")
Reviewed-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
plbossart added a commit that referenced this issue May 24, 2019
In some configurations, it's a requirement to split the probe in two,
with a second part handled in a workqueue (e.g. for HDMI support
which depends on the DRM modules).

SOF already handles these configurations but the error flow is
incorrect. When an error occurs in the workqueue, the probe has
technically already completed. If we release the resources on errors,
this generates kernel oops/use-after-free when the resources are
released a second time on module removal.

GitHub issue: #945
Fixes: c16211d ("ASoC: SOF: Add Sound Open Firmware driver core")
Reviewed-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
jason77-wang pushed a commit to jason77-wang/oem that referenced this issue May 28, 2019
In some configurations, it's a requirement to split the probe in two,
with a second part handled in a workqueue (e.g. for HDMI support
which depends on the DRM modules).

SOF already handles these configurations but the error flow is
incorrect. When an error occurs in the workqueue, the probe has
technically already completed. If we release the resources on errors,
this generates kernel oops/use-after-free when the resources are
released a second time on module removal.

GitHub issue: thesofproject/linux#945
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
jason77-wang pushed a commit to jason77-wang/oem that referenced this issue Jun 1, 2019
BugLink: https://bugs.launchpad.net/bugs/1826181

In some configurations, it's a requirement to split the probe in two,
with a second part handled in a workqueue (e.g. for HDMI support
which depends on the DRM modules).

SOF already handles these configurations but the error flow is
incorrect. When an error occurs in the workqueue, the probe has
technically already completed. If we release the resources on errors,
this generates kernel oops/use-after-free when the resources are
released a second time on module removal.

GitHub issue: thesofproject/linux#945
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
(cherry picked from commit cbdcbcd38cc6f420241ed8e781e98605836e5c95
git://github.com/thesofproject/linux.git)
Signed-off-by: Hui Wang <hui.wang@canonical.com>
plbossart added a commit that referenced this issue Jun 3, 2019
In some configurations, it's a requirement to split the probe in two,
with a second part handled in a workqueue (e.g. for HDMI support
which depends on the DRM modules).

SOF already handles these configurations but the error flow is
incorrect. When an error occurs in the workqueue, the probe has
technically already completed. If we release the resources on errors,
this generates kernel oops/use-after-free when the resources are
released a second time on module removal.

GitHub issue: #945
Fixes: c16211d ("ASoC: SOF: Add Sound Open Firmware driver core")
Reviewed-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
(cherry picked from commit 0bce512)
jason77-wang pushed a commit to jason77-wang/oem that referenced this issue Jun 18, 2019
BugLink: https://bugs.launchpad.net/bugs/1826181

In some configurations, it's a requirement to split the probe in two,
with a second part handled in a workqueue (e.g. for HDMI support
which depends on the DRM modules).

SOF already handles these configurations but the error flow is
incorrect. When an error occurs in the workqueue, the probe has
technically already completed. If we release the resources on errors,
this generates kernel oops/use-after-free when the resources are
released a second time on module removal.

GitHub issue: thesofproject/linux#945
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
(cherry picked from commit cbdcbcd38cc6f420241ed8e781e98605836e5c95
git://github.com/thesofproject/linux.git)
Signed-off-by: Hui Wang <hui.wang@canonical.com>
Signed-off-by: Timo Aaltonen <timo.aaltonen@canonical.com>
jason77-wang pushed a commit to jason77-wang/oem that referenced this issue Jun 24, 2019
BugLink: https://bugs.launchpad.net/bugs/1826181

In some configurations, it's a requirement to split the probe in two,
with a second part handled in a workqueue (e.g. for HDMI support
which depends on the DRM modules).

SOF already handles these configurations but the error flow is
incorrect. When an error occurs in the workqueue, the probe has
technically already completed. If we release the resources on errors,
this generates kernel oops/use-after-free when the resources are
released a second time on module removal.

GitHub issue: thesofproject/linux#945
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
(cherry picked from commit cbdcbcd38cc6f420241ed8e781e98605836e5c95
git://github.com/thesofproject/linux.git)
Signed-off-by: Hui Wang <hui.wang@canonical.com>
Signed-off-by: Timo Aaltonen <timo.aaltonen@canonical.com>
sathyap-chrome pushed a commit to sathyap-chrome/linux that referenced this issue Jun 25, 2019
In some configurations, it's a requirement to split the probe in two,
with a second part handled in a workqueue (e.g. for HDMI support
which depends on the DRM modules).

SOF already handles these configurations but the error flow is
incorrect. When an error occurs in the workqueue, the probe has
technically already completed. If we release the resources on errors,
this generates kernel oops/use-after-free when the resources are
released a second time on module removal.

GitHub issue: thesofproject#945
Fixes: c16211d ("ASoC: SOF: Add Sound Open Firmware driver core")
Reviewed-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
(cherry picked from commit 0bce512
 git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next)

BUG=b:134688240
TEST=Test Audio use cases for CML with full SOF patch series applied.

Change-Id: I78bb4807ee8534269ea04f4bc238a4a9975b2678
Signed-off-by: Ap, Kamal <kamal.ap@intel.corp-partner.google.com>
gs0622 pushed a commit to gs0622/linux that referenced this issue Jun 25, 2019
In some configurations, it's a requirement to split the probe in two,
with a second part handled in a workqueue (e.g. for HDMI support
which depends on the DRM modules).

SOF already handles these configurations but the error flow is
incorrect. When an error occurs in the workqueue, the probe has
technically already completed. If we release the resources on errors,
this generates kernel oops/use-after-free when the resources are
released a second time on module removal.

GitHub issue: thesofproject#945
Fixes: c16211d ("ASoC: SOF: Add Sound Open Firmware driver core")
Reviewed-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
fcicq pushed a commit to fcicq/chromiumos-third_party-kernel that referenced this issue Jun 29, 2019
In some configurations, it's a requirement to split the probe in two,
with a second part handled in a workqueue (e.g. for HDMI support
which depends on the DRM modules).

SOF already handles these configurations but the error flow is
incorrect. When an error occurs in the workqueue, the probe has
technically already completed. If we release the resources on errors,
this generates kernel oops/use-after-free when the resources are
released a second time on module removal.

GitHub issue: thesofproject/linux#945
Fixes: c16211d ("ASoC: SOF: Add Sound Open Firmware driver core")
Reviewed-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
(cherry picked from commit 0bce512
 git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next)

BUG=b:134688240
TEST=Test Audio use cases for CML with full SOF patch series applied.

Signed-off-by: Ap, Kamal <kamal.ap@intel.corp-partner.google.com>
jason77-wang pushed a commit to jason77-wang/oem that referenced this issue Jul 5, 2019
BugLink: https://bugs.launchpad.net/bugs/1826181

In some configurations, it's a requirement to split the probe in two,
with a second part handled in a workqueue (e.g. for HDMI support
which depends on the DRM modules).

SOF already handles these configurations but the error flow is
incorrect. When an error occurs in the workqueue, the probe has
technically already completed. If we release the resources on errors,
this generates kernel oops/use-after-free when the resources are
released a second time on module removal.

GitHub issue: thesofproject/linux#945
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
(cherry picked from commit cbdcbcd38cc6f420241ed8e781e98605836e5c95
git://github.com/thesofproject/linux.git)
Signed-off-by: Hui Wang <hui.wang@canonical.com>
Signed-off-by: Timo Aaltonen <timo.aaltonen@canonical.com>
cujomalainey pushed a commit to cujomalainey/linux that referenced this issue Jul 9, 2019
In some configurations, it's a requirement to split the probe in two,
with a second part handled in a workqueue (e.g. for HDMI support
which depends on the DRM modules).

SOF already handles these configurations but the error flow is
incorrect. When an error occurs in the workqueue, the probe has
technically already completed. If we release the resources on errors,
this generates kernel oops/use-after-free when the resources are
released a second time on module removal.

GitHub issue: thesofproject#945
Fixes: c16211d ("ASoC: SOF: Add Sound Open Firmware driver core")
Reviewed-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
(cherry picked from commit 0bce512)

BUG=b:135490563
TEST=Test Audio use cases for GLK with full SOF patch series applied.

Signed-off-by: Curtis Malainey <cujomalainey@chromium.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working ICL Applies to Icelake platform
Projects
None yet
Development

No branches or pull requests

3 participants