]> git.baikalelectronics.ru Git - kernel.git/commit
ALSA: timer: Limit max amount of slave instances
authorTakashi Iwai <tiwai@suse.de>
Wed, 6 Nov 2019 15:42:57 +0000 (16:42 +0100)
committerTakashi Iwai <tiwai@suse.de>
Wed, 6 Nov 2019 16:57:52 +0000 (17:57 +0100)
commit4a3f4f4cadc53237a498c4b5573703f1db43e535
treeedb9a592f464c587aa6ac1afb50fd194f3479459
parentbadcbbba5a50c17f3d2e848f01a06ad30641f78e
ALSA: timer: Limit max amount of slave instances

The fuzzer tries to open the timer instances as much as possible, and
this may cause a system hiccup easily.  We've already introduced the
cap for the max number of available instances for the h/w timers, and
we should put such a limit also to the slave timers, too.

This patch introduces the limit to the multiple opened slave timers.
The upper limit is hard-coded to 1000 for now, which should suffice
for any practical usages up to now.

Link: https://lore.kernel.org/r/20191106154257.5853-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/core/timer.c