]> git.baikalelectronics.ru Git - kernel.git/commit
ALSA: pcm: Free chmap at PCM free callback, too
authorTakashi Iwai <tiwai@suse.de>
Fri, 8 Jul 2016 06:23:43 +0000 (08:23 +0200)
committerTakashi Iwai <tiwai@suse.de>
Fri, 8 Jul 2016 07:15:44 +0000 (09:15 +0200)
commit6963816aed7dc1131da9ba524af534fc4c71cfe1
treea390e6a283029335160755394129bb9784719446
parent45c1b5c9f312237d06a7fd04ec518b9b08b04aec
ALSA: pcm: Free chmap at PCM free callback, too

The chmap ctls assigned to PCM streams are freed in the PCM disconnect
callback.  However, since the disconnect callback isn't called when
the card gets freed before registering, the chmap ctls may still be
left assigned.  They are eventually freed together with other ctls,
but it may cause an Oops at pcm_chmap_ctl_private_free(), as the
function refers to the assigned PCM stream, while the PCM objects have
been already freed beforehand.

The fix is to free the chmap ctls also at PCM free callback, not only
at PCM disconnect.

Reported-by: Laxminath Kasam <b_lkasam@codeaurora.org>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/core/pcm.c