[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <lsq.1581185940.179588484@decadent.org.uk>
Date: Sat, 08 Feb 2020 18:20:28 +0000
From: Ben Hutchings <ben@...adent.org.uk>
To: linux-kernel@...r.kernel.org, stable@...r.kernel.org
CC: akpm@...ux-foundation.org, Denis Kirjanov <kda@...ux-powerpc.org>,
"Pawel Harlozinski" <pawel.harlozinski@...ux.intel.com>,
"Mark Brown" <broonie@...nel.org>
Subject: [PATCH 3.16 089/148] ASoC: Jack: Fix NULL pointer dereference in
snd_soc_jack_report
3.16.82-rc1 review patch. If anyone has any objections, please let me know.
------------------
From: Pawel Harlozinski <pawel.harlozinski@...ux.intel.com>
commit 8f157d4ff039e03e2ed4cb602eeed2fd4687a58f upstream.
Check for existance of jack before tracing.
NULL pointer dereference has been reported by KASAN while unloading
machine driver (snd_soc_cnl_rt274).
Signed-off-by: Pawel Harlozinski <pawel.harlozinski@...ux.intel.com>
Link: https://lore.kernel.org/r/20191112130237.10141-1-pawel.harlozinski@linux.intel.com
Signed-off-by: Mark Brown <broonie@...nel.org>
Signed-off-by: Ben Hutchings <ben@...adent.org.uk>
---
sound/soc/soc-jack.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
--- a/sound/soc/soc-jack.c
+++ b/sound/soc/soc-jack.c
@@ -69,10 +69,9 @@ void snd_soc_jack_report(struct snd_soc_
unsigned int sync = 0;
int enable;
- trace_snd_soc_jack_report(jack, mask, status);
-
if (!jack)
return;
+ trace_snd_soc_jack_report(jack, mask, status);
codec = jack->codec;
dapm = &codec->dapm;
Powered by blists - more mailing lists