]> git.proxmox.com Git - mirror_ubuntu-bionic-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)
committerKhalid Elmously <khalid.elmously@canonical.com>
Wed, 29 Jan 2020 04:45:21 +0000 (23:45 -0500)
commite1ac631c8f98568ac568fec04650c4b0ac19f67b
treeeb53869a00c26900b892c450a8081ba5ad0f67e5
parentf6b12116c0ec70e3d40c387d990ef3ef1d277437
ALSA: timer: Limit max amount of slave instances

BugLink: https://bugs.launchpad.net/bugs/1859712
[ Upstream commit fdea53fe5de532969a332d6e5e727f2ad8bf084d ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
sound/core/timer.c