mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-08 03:40:35 +09:00
ASoC: Jack: Fix NULL pointer dereference in snd_soc_jack_report
commit 8f157d4ff0 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@linux.intel.com>
Link: https://lore.kernel.org/r/20191112130237.10141-1-pawel.harlozinski@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Cc: stable@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
560025a0b5
commit
9ae0611f0c
@@ -82,10 +82,9 @@ void snd_soc_jack_report(struct snd_soc_jack *jack, int status, int mask)
|
||||
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);
|
||||
|
||||
dapm = &jack->card->dapm;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user