Re: [PATCH] ALSA: seq: Remove arbitrary prioq insertion limit

From: Takashi Iwai

Date: Tue May 26 2026 - 01:55:33 EST


On Mon, 25 May 2026 16:16:09 +0200,
Cássio Gabriel wrote:
>
> The sequencer priority queue insertion path uses a hardcoded traversal
> limit of 10000 entries. The value is intended to catch a corrupted list,
> but it also becomes a real limit for valid queues.
>
> The event pool limit is per client, while a sequencer queue can be shared
> by multiple clients. A queue can therefore legitimately contain more than
> 10000 events. In that case, inserting an event that has to be placed past
> the arbitrary limit fails with -EINVAL.
>
> Use the queue's own cell count as the traversal bound instead. This keeps
> the protection against inconsistent list accounting or cyclic lists without
> rejecting valid large queues.
>
> Signed-off-by: Cássio Gabriel <cassiogabrielcontato@xxxxxxxxx>

Applied to for-next. Thanks.


Takashi