stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Patch "ALSA: usb-audio: Fix runtime PM unbalance" has been added to the 4.1-stable tree
@ 2015-09-11 22:17 gregkh
  0 siblings, 0 replies; only message in thread
From: gregkh @ 2015-09-11 22:17 UTC (permalink / raw)
  To: tiwai, gregkh, hansy; +Cc: stable, stable-commits


This is a note to let you know that I've just added the patch titled

    ALSA: usb-audio: Fix runtime PM unbalance

to the 4.1-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     alsa-usb-audio-fix-runtime-pm-unbalance.patch
and it can be found in the queue-4.1 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.


>From 9003ebb13f61e8c78a641e0dda7775183ada0625 Mon Sep 17 00:00:00 2001
From: Takashi Iwai <tiwai@suse.de>
Date: Wed, 19 Aug 2015 07:20:14 +0200
Subject: ALSA: usb-audio: Fix runtime PM unbalance

From: Takashi Iwai <tiwai@suse.de>

commit 9003ebb13f61e8c78a641e0dda7775183ada0625 upstream.

The fix for deadlock in PM in commit [1ee23fe07ee8: ALSA: usb-audio:
Fix deadlocks at resuming] introduced a new check of in_pm flag.
However, the brainless patch author evaluated it in a wrong way
(logical AND instead of logical OR), thus usb_autopm_get_interface()
is wrongly called at probing, leading to unbalance of runtime PM
refcount.

This patch fixes it by correcting the logic.

Reported-by: Hans Yang <hansy@nvidia.com>
Fixes: 1ee23fe07ee8 ('ALSA: usb-audio: Fix deadlocks at resuming')
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 sound/usb/card.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/sound/usb/card.c
+++ b/sound/usb/card.c
@@ -638,7 +638,7 @@ int snd_usb_autoresume(struct snd_usb_au
 	int err = -ENODEV;
 
 	down_read(&chip->shutdown_rwsem);
-	if (chip->probing && chip->in_pm)
+	if (chip->probing || chip->in_pm)
 		err = 0;
 	else if (!chip->shutdown)
 		err = usb_autopm_get_interface(chip->pm_intf);


Patches currently in stable-queue which might be from tiwai@suse.de are

queue-4.1/alsa-hda-fix-possible-null-dereference.patch
queue-4.1/alsa-hda-fix-the-white-noise-on-dell-laptop.patch
queue-4.1/alsa-usb-add-native-dsd-support-for-gustard-dac-x20u.patch
queue-4.1/alsa-hda-fix-path-power-activation.patch
queue-4.1/alsa-hda-check-all-inputs-for-is_active_nid_for_any.patch
queue-4.1/alsa-usb-audio-fix-runtime-pm-unbalance.patch
queue-4.1/alsa-hda-shutdown-cx20722-on-reboot-free-to-avoid-spurious-noises.patch

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2015-09-11 22:19 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-11 22:17 Patch "ALSA: usb-audio: Fix runtime PM unbalance" has been added to the 4.1-stable tree gregkh

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).