diff mbox

ALSA: control: remove entry limitation for list operation

Message ID 20170524010430.1371-1-o-takashi@sakamocchi.jp (mailing list archive)
State New, archived
Headers show

Commit Message

Takashi Sakamoto May 24, 2017, 1:04 a.m. UTC
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.
---
 sound/core/control.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

Comments

Takashi Iwai May 24, 2017, 6:31 a.m. UTC | #1
On Wed, 24 May 2017 03:04:30 +0200,
Takashi Sakamoto wrote:
> 
> 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.
> ---

You forgot your sign-off.


thanks,

Takashi
Takashi Sakamoto May 24, 2017, 8:16 a.m. UTC | #2
On 2017年05月24日 15:31, Takashi Iwai wrote:
> On Wed, 24 May 2017 03:04:30 +0200,
> Takashi Sakamoto wrote:
>>
>> 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.
>> ---
> 
> You forgot your sign-off.

Oops. I might be tired in this morning...

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>


Thanks

Takashi Sakamoto
Takashi Iwai May 24, 2017, 8:20 a.m. UTC | #3
On Wed, 24 May 2017 10:16:47 +0200,
Takashi Sakamoto wrote:
> 
> On 2017年05月24日 15:31, Takashi Iwai wrote:
> > On Wed, 24 May 2017 03:04:30 +0200,
> > Takashi Sakamoto wrote:
> >>
> >> 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.
> >> ---
> >
> > You forgot your sign-off.
> 
> Oops. I might be tired in this morning...
> 
> Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>

Applied now.  Thanks.


Takashi
diff mbox

Patch

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;