All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mark Brown <broonie@kernel.org>
To: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Cc: tiwai@suse.de, alsa-devel@alsa-project.org,
	Mark Brown <broonie@kernel.org>,
	Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Subject: [alsa-devel] Applied "ASoC: hdac_hda: Fix error in driver removal after failed probe" to the asoc tree
Date: Mon, 13 Jan 2020 15:13:11 +0000 (GMT)	[thread overview]
Message-ID: <applied-20200110235751.3404-9-pierre-louis.bossart@linux.intel.com> (raw)
In-Reply-To: <20200110235751.3404-9-pierre-louis.bossart@linux.intel.com>

The patch

   ASoC: hdac_hda: Fix error in driver removal after failed probe

has been applied to the asoc tree at

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git 

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.  

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark

From 552b1a85da9f63856e7e341b81c16e0e078204f1 Mon Sep 17 00:00:00 2001
From: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Date: Fri, 10 Jan 2020 17:57:51 -0600
Subject: [PATCH] ASoC: hdac_hda: Fix error in driver removal after failed
 probe

In case system has multiple HDA codecs, and codec probe fails for
at least one but not all codecs, driver will end up cancelling
a non-initialized timer context upon driver removal.

Call trace of typical case:

[   60.593646] WARNING: CPU: 1 PID: 1147 at kernel/workqueue.c:3032
__flush_work+0x18b/0x1a0
[...]
[   60.593670]  __cancel_work_timer+0x11f/0x1a0
[   60.593673]  hdac_hda_dev_remove+0x25/0x30 [snd_soc_hdac_hda]
[   60.593674]  device_release_driver_internal+0xe0/0x1c0
[   60.593675]  bus_remove_device+0xd6/0x140
[   60.593677]  device_del+0x175/0x3e0
[   60.593679]  ? widget_tree_free.isra.7+0x90/0xb0 [snd_hda_core]
[   60.593680]  snd_hdac_device_unregister+0x34/0x50 [snd_hda_core]
[   60.593682]  snd_hdac_ext_bus_device_remove+0x2a/0x60 [snd_hda_ext_core]
[   60.593684]  hda_dsp_remove+0x26/0x100 [snd_sof_intel_hda_common]
[   60.593686]  snd_sof_device_remove+0x84/0xa0 [snd_sof]
[   60.593687]  sof_pci_remove+0x10/0x30 [snd_sof_pci]
[   60.593689]  pci_device_remove+0x36/0xb0

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20200110235751.3404-9-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 sound/soc/codecs/hdac_hda.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/sound/soc/codecs/hdac_hda.c b/sound/soc/codecs/hdac_hda.c
index 6803d39e09a5..43110151e928 100644
--- a/sound/soc/codecs/hdac_hda.c
+++ b/sound/soc/codecs/hdac_hda.c
@@ -588,7 +588,9 @@ static int hdac_hda_dev_remove(struct hdac_device *hdev)
 	struct hdac_hda_priv *hda_pvt;
 
 	hda_pvt = dev_get_drvdata(&hdev->dev);
-	cancel_delayed_work_sync(&hda_pvt->codec.jackpoll_work);
+	if (hda_pvt && hda_pvt->codec.registered)
+		cancel_delayed_work_sync(&hda_pvt->codec.jackpoll_work);
+
 	return 0;
 }
 
-- 
2.20.1

_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel

      reply	other threads:[~2020-01-14 13:14 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-10 23:57 [alsa-devel] [PATCH 0/8] ASOC: SOF: Intel: improvements for Broadwell, HDA, OSS Pierre-Louis Bossart
2020-01-10 23:57 ` [alsa-devel] [PATCH 1/8] ASoC: Intel: bdw-rt5677: fix Kconfig dependencies Pierre-Louis Bossart
2020-01-13 15:13   ` [alsa-devel] Applied "ASoC: Intel: bdw-rt5677: fix Kconfig dependencies" to the asoc tree Mark Brown
2020-01-10 23:57 ` [alsa-devel] [PATCH 2/8] ASoC: Intel: bdw-rt5677: change cpu_dai and platform components for SOF Pierre-Louis Bossart
2020-01-13 15:13   ` [alsa-devel] Applied "ASoC: Intel: bdw-rt5677: change cpu_dai and platform components for SOF" to the asoc tree Mark Brown
2020-01-10 23:57 ` [alsa-devel] [PATCH 3/8] ASoC: Intel: broadwell: change cpu_dai and platform components for SOF Pierre-Louis Bossart
2020-01-13 15:13   ` [alsa-devel] Applied "ASoC: Intel: broadwell: change cpu_dai and platform components for SOF" to the asoc tree Mark Brown
2020-01-10 23:57 ` [alsa-devel] [PATCH 4/8] ASoC: Intel: bdw-rt5650: change cpu_dai and platform components for SOF Pierre-Louis Bossart
2020-01-13 15:13   ` [alsa-devel] Applied "ASoC: Intel: bdw-rt5650: change cpu_dai and platform components for SOF" to the asoc tree Mark Brown
2020-01-10 23:57 ` [alsa-devel] [PATCH 5/8] ASoC: SOF: Intel: lower print level to dbg if we will reinit DSP Pierre-Louis Bossart
2020-01-13 15:13   ` [alsa-devel] Applied "ASoC: SOF: Intel: lower print level to dbg if we will reinit DSP" to the asoc tree Mark Brown
2020-01-10 23:57 ` [alsa-devel] [PATCH 6/8] ASoC: SOF: fix PCM playback through ALSA OSS emulation Pierre-Louis Bossart
2020-01-13 15:13   ` [alsa-devel] Applied "ASoC: SOF: fix PCM playback through ALSA OSS emulation" to the asoc tree Mark Brown
2020-01-10 23:57 ` [alsa-devel] [PATCH 7/8] ASoC: SOF: Intel: fix HDA codec driver probe with multiple controllers Pierre-Louis Bossart
2020-01-10 23:57 ` [alsa-devel] [PATCH 8/8] ASoC: hdac_hda: Fix error in driver removal after failed probe Pierre-Louis Bossart
2020-01-13 15:13   ` Mark Brown [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=applied-20200110235751.3404-9-pierre-louis.bossart@linux.intel.com \
    --to=broonie@kernel.org \
    --cc=alsa-devel@alsa-project.org \
    --cc=kai.vehmanen@linux.intel.com \
    --cc=pierre-louis.bossart@linux.intel.com \
    --cc=tiwai@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.