From: Takashi Sakamoto Date: Wed, 24 May 2017 01:04:30 +0000 (+0900) Subject: ALSA: control: remove entry limitation for list operation X-Git-Tag: v4.13-rc1~142^2~141 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=4e361d3c962dda16e27d81e7aa9202828a8f7371;p=karo-tx-linux.git ALSA: control: remove entry limitation for list operation In current implementation of ALSA control core, list operation has a limitation to handle 16384 entries at once. This seems due to allocation in kernel space to copy data from user space. With a commit 53e7bf452584 ("ALSA: control: Simplify snd_ctl_elem_list() implementation"), for the operation, ALSA control core copies data into user space directly. No need to care of kernel spaces anymore. This commit purges the limitation. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai --- diff --git a/sound/core/control.c b/sound/core/control.c index 47080da8451a..ecd358213b83 100644 --- a/sound/core/control.c +++ b/sound/core/control.c @@ -757,9 +757,7 @@ static int snd_ctl_elem_list(struct snd_card *card, return -EFAULT; offset = list.offset; space = list.space; - /* try limit maximum space */ - if (space > 16384) - return -ENOMEM; + down_read(&card->controls_rwsem); list.count = card->controls_count; list.used = 0;