]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
ALSA: usb-audio: Cancel pending work at closing a MIDI substream
authorTakashi Iwai <tiwai@suse.de>
Wed, 25 May 2022 13:12:03 +0000 (15:12 +0200)
committerStefan Bader <stefan.bader@canonical.com>
Wed, 10 Aug 2022 07:23:31 +0000 (09:23 +0200)
commita9e9695118a78338d2d410204369e5ad8c4f1d4f
treeb27e00abe6ecf0aa6ae922f9ffaa8434c6070c58
parentbef10454344407ed0f02e06323c9845bca07a7e8
ALSA: usb-audio: Cancel pending work at closing a MIDI substream

BugLink: https://bugs.launchpad.net/bugs/1981864
commit 0125de38122f0f66bf61336158d12a1aabfe6425 upstream.

At closing a USB MIDI output substream, there might be still a pending
work, which would eventually access the rawmidi runtime object that is
being released.  For fixing the race, make sure to cancel the pending
work at closing.

Reported-by: syzbot+6912c9592caca7ca0e7d@syzkaller.appspotmail.com
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/000000000000e7e75005dfd07cf6@google.com
Link: https://lore.kernel.org/r/20220525131203.11299-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
sound/usb/midi.c