]> git.baikalelectronics.ru Git - kernel.git/commit
ALSA: timer: catch invalid timer object creation
authorSrikanth K H <srikanth.h@samsung.com>
Fri, 20 Jul 2018 05:43:51 +0000 (11:13 +0530)
committerTakashi Iwai <tiwai@suse.de>
Sun, 22 Jul 2018 08:42:41 +0000 (10:42 +0200)
commitc4826c4a4de862c264ef15abb1b2b2e9de50f384
treea61c0a181b0348cba7f3415a550d5f4d77014622
parent5b7c4df1dc326e8c9a728822068bf992d49b6f6d
ALSA: timer: catch invalid timer object creation

A timer object for the classes SNDRV_TIMER_CLASS_CARD and
SNDRV_TIMER_CLASS_PCM has to be associated with a card object, but we
have no check at creation time.  Such a timer object with NULL card
causes various unexpected problems, e.g. NULL dereference at reading
the sound timer proc file.

So as preventive measure while the creating the sound timer object is
created the card information availability is checked for the mentioned
entries and returned error if its NULL.

Signed-off-by: Srikanth K H <srikanth.h@samsung.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/core/timer.c