[alsa-devel] [PATCH 1/2] ALSA: hda - skip runtime PM if async probe is not finished

U. Artie Eoff ullysses.a.eoff at intel.com
Mon Jul 27 23:34:53 CEST 2015


Crash can occur if runtime PM is triggered before the async probe
finishes via the azx_firmware_cb when CONFIG_SND_HDA_PATCH_LOADER
is defined.

Don't execute PM ops if the async probe has not completed yet.

The probe is finished when chip->running is true.

Signed-off-by: U. Artie Eoff <ullysses.a.eoff at intel.com>
---
 sound/pci/hda/hda_intel.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c
index 735bdcb04ce8..b729b25a6ad6 100644
--- a/sound/pci/hda/hda_intel.c
+++ b/sound/pci/hda/hda_intel.c
@@ -1023,7 +1023,7 @@ static int azx_runtime_idle(struct device *dev)
 
 	chip = card->private_data;
 	hda = container_of(chip, struct hda_intel, chip);
-	if (chip->disabled || hda->init_failed)
+	if (chip->disabled || hda->init_failed || !chip->running)
 		return 0;
 
 	if (!power_save_controller || !azx_has_pm_runtime(chip) ||
-- 
1.9.3



More information about the Alsa-devel mailing list