mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-03 17:51:57 +09:00
ASoC: dapm: delete dapm_kcontrol_data paths list before freeing it
commit ff2faf1289 upstream.
dapm_kcontrol_data is freed as part of dapm_kcontrol_free(), leaving the
paths pointer dangling in the list.
This leads to system crash when we try to unload and reload sound card.
I hit this bug during ADSP crash/reboot test case on Dragon board DB410c.
Without this patch, on SLAB Poisoning enabled build, kernel crashes with
"BUG kmalloc-128 (Tainted: G W ): Poison overwritten"
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
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
4e0ce7053a
commit
040fecfd71
@@ -430,6 +430,8 @@ err_data:
|
||||
static void dapm_kcontrol_free(struct snd_kcontrol *kctl)
|
||||
{
|
||||
struct dapm_kcontrol_data *data = snd_kcontrol_chip(kctl);
|
||||
|
||||
list_del(&data->paths);
|
||||
kfree(data->wlist);
|
||||
kfree(data);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user