FROMLIST: ALSA: seq: Fix port lock leak in deliver_to_subscribers()
Commit 46397622a3fa ("ALSA: seq: Add UMP support") mistakenly removed
the `snd_seq_port_unlock(src_port)` call in deliver_to_subscribers().
As a result, every time an event is delivered to a subscriber, the
source port's `use_lock` atomic counter is increased but never
decreased.
The leak prevents ALSA sequencer ports from closing cleanly. When the
client process exits or destroys the port, port_delete() hangs forever
at snd_use_lock_sync(). The process becomes stuck in an unkillable D
state, triggering the following warning:
ALSA: seq_lock: waiting [1 left] in sound/core/seq/seq_ports.c:250
Restore the missing `snd_seq_port_unlock(src_port)`.
Note that commit 177ccf811df4 ("ALSA: seq: Support MIDI 2.0 UMP Endpoint
port") incidentally resolved this issue upstream when it refactored the
locking logic into a wrapper function. However, since the commit
introduces a new feature and might not be suitable for stable release
branches, this targeted fix is necessary.
Fixes: d7e2ce72833b ("ALSA: seq: Add UMP support")
Signed-off-by: Tzung-Bi Shih <tzungbi@kernel.org>
(am from https://lore.kernel.org/r/20260904070349.80497-1-tzungbi@kernel.org)
BUG=b:556069856
BUG=b:542900253
BUG=b:542899054
TEST=Run tast arc.MIDIClient.vm twice on Betty
Change-Id: I02225a58c9a983c38d4c7e317d0b0b452049eab0
Signed-off-by: Tzung-Bi Shih <tzungbi@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/8357689
Reviewed-by: Tomasz Figa <tfiga@chromium.org>