lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  PHC 
Open Source and information security mailing list archives
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 15 Sep 2014 12:25:51 -0700
From:	Greg Kroah-Hartman <>
Cc:	Greg Kroah-Hartman <>,,
	Charles Keepax <>,
	Mark Brown <>
Subject: [PATCH 3.14 051/114] ASoC: wm8994: Prevent double lock of accdet_lock mutex on wm1811

3.14-stable review patch.  If anyone has any objections, please let me know.


From: Charles Keepax <>

commit b38314179c9ccb789e6fe967cff171fa817e8978 upstream.

wm1811_micd_stop takes the accdet_lock mutex, and is called from two
places, one of which is already holding the accdet_lock. This obviously
causes a lock up.

This patch fixes this issue by removing the lock from wm1811_micd_stop
and ensuring that it is always locked externally.

Signed-off-by: Charles Keepax <>
Signed-off-by: Mark Brown <>
Signed-off-by: Greg Kroah-Hartman <>

 sound/soc/codecs/wm8994.c |    9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

--- a/sound/soc/codecs/wm8994.c
+++ b/sound/soc/codecs/wm8994.c
@@ -3497,6 +3497,7 @@ static irqreturn_t wm8994_mic_irq(int ir
 	return IRQ_HANDLED;
+/* Should be called with accdet_lock held */
 static void wm1811_micd_stop(struct snd_soc_codec *codec)
 	struct wm8994_priv *wm8994 = snd_soc_codec_get_drvdata(codec);
@@ -3504,14 +3505,10 @@ static void wm1811_micd_stop(struct snd_
 	if (!wm8994->jackdet)
-	mutex_lock(&wm8994->accdet_lock);
 	snd_soc_update_bits(codec, WM8958_MIC_DETECT_1, WM8958_MICD_ENA, 0);
 	wm1811_jackdet_set_mode(codec, WM1811_JACKDET_MODE_JACK);
-	mutex_unlock(&wm8994->accdet_lock);
 	if (wm8994->wm8994->pdata.jd_ext_cap)
@@ -3552,10 +3549,10 @@ static void wm8958_open_circuit_work(str;
 	struct device *dev = wm8994->wm8994->dev;
-	wm1811_micd_stop(wm8994->hubs.codec);
+	wm1811_micd_stop(wm8994->hubs.codec);
 	dev_dbg(dev, "Reporting open circuit\n");
 	wm8994->jack_mic = false;

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

Powered by blists - more mailing lists