]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
ALSA: seq: Remove arbitrary prioq insertion limit
authorCássio Gabriel <cassiogabrielcontato@gmail.com>
Mon, 25 May 2026 14:16:09 +0000 (11:16 -0300)
committerTakashi Iwai <tiwai@suse.de>
Tue, 26 May 2026 05:54:36 +0000 (07:54 +0200)
commit3fcc84f1f8d28cc1966b859cef33c858ff531766
tree4b90808165dd7c889a9f554d4f1f2641700bc3b8
parent5d1d092b8df9aa3c45a58a22e13b92afa850146f
ALSA: seq: Remove arbitrary prioq insertion limit

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@gmail.com>
Link: https://patch.msgid.link/20260525-alsa-seq-prioq-limit-v1-1-16c348df5ff7@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/core/seq/seq_prioq.c