Patch "ALSA: hda/hdmi: fix without unlocked before return" has been added to the 5.6-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

    ALSA: hda/hdmi: fix without unlocked before return

to the 5.6-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-hda-hdmi-fix-without-unlocked-before-return.patch
and it can be found in the queue-5.6 subdirectory.

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



commit ecc04428d2bd6573d81e021869e0189f6c5218b5
Author: Wu Bo <wubo40@xxxxxxxxxx>
Date:   Sun Apr 26 21:17:22 2020 +0800

    ALSA: hda/hdmi: fix without unlocked before return
    
    commit a2f647240998aa49632fb09b01388fdf2b87acfc upstream.
    
    Fix the following coccicheck warning:
    sound/pci/hda/patch_hdmi.c:1852:2-8: preceding lock on line 1846
    
    After add sanity check to pass klockwork check,
    The spdif_mutex should be unlock before return true
    in check_non_pcm_per_cvt().
    
    Fixes: 960a581e22d9 ("ALSA: hda: fix some klockwork scan warnings")
    Signed-off-by: Wu Bo <wubo40@xxxxxxxxxx>
    Cc: <stable@xxxxxxxxxxxxxxx>
    Link: https://lore.kernel.org/r/1587907042-694161-1-git-send-email-wubo40@xxxxxxxxxx
    Signed-off-by: Takashi Iwai <tiwai@xxxxxxx>
    Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>

diff --git a/sound/pci/hda/patch_hdmi.c b/sound/pci/hda/patch_hdmi.c
index 8bc4d66ff986b..0c1a59d5ad59d 100644
--- a/sound/pci/hda/patch_hdmi.c
+++ b/sound/pci/hda/patch_hdmi.c
@@ -1934,8 +1934,10 @@ static bool check_non_pcm_per_cvt(struct hda_codec *codec, hda_nid_t cvt_nid)
 	/* Add sanity check to pass klockwork check.
 	 * This should never happen.
 	 */
-	if (WARN_ON(spdif == NULL))
+	if (WARN_ON(spdif == NULL)) {
+		mutex_unlock(&codec->spdif_mutex);
 		return true;
+	}
 	non_pcm = !!(spdif->status & IEC958_AES0_NONAUDIO);
 	mutex_unlock(&codec->spdif_mutex);
 	return non_pcm;



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux