diff options
author | Takashi Iwai <[email protected]> | 2022-04-20 15:02:47 +0200 |
---|---|---|
committer | Takashi Iwai <[email protected]> | 2022-04-20 15:13:45 +0200 |
commit | 0665886ad1392e6b5bae85d7a6ccbed48dca1522 (patch) | |
tree | 9a00a5473e824803beff2336a41ed2d05619a5f1 /scripts/bpf_doc.py | |
parent | 0aea30a07ec6b50de0fc5f5b2ec34a68ead86b61 (diff) |
ALSA: usb-audio: Clear MIDI port active flag after draining
When a rawmidi output stream is closed, it calls the drain at first,
then does trigger-off only when the drain returns -ERESTARTSYS as a
fallback. It implies that each driver should turn off the stream
properly after the drain. Meanwhile, USB-audio MIDI interface didn't
change the port->active flag after the drain. This may leave the
output work picking up the port that is closed right now, which
eventually leads to a use-after-free for the already released rawmidi
object.
This patch fixes the bug by properly clearing the port->active flag
after the output drain.
Reported-by: [email protected]
Cc: <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Takashi Iwai <[email protected]>
Diffstat (limited to 'scripts/bpf_doc.py')
0 files changed, 0 insertions, 0 deletions