]> git.hungrycats.org Git - linux/commit
ALSA: rawmidi: Fix kvfree() call in spinlock
authorTakashi Iwai <tiwai@suse.de>
Mon, 25 Nov 2024 14:20:25 +0000 (15:20 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 5 Dec 2024 12:54:22 +0000 (13:54 +0100)
commit237e7fa2c844280f469eca87d8d1e7d9d9fa1e8d
tree62168c0245d6fd02b794e97d7bfd553f35f0df41
parentf68fb9f76c6b52de63c696e7e6e719d722e904f4
ALSA: rawmidi: Fix kvfree() call in spinlock

commit 20c0c49720dc4e205d4c1d64add56a5043c5ec5f upstream.

At the conversion of locking with guard(), I overlooked that kvfree()
must not be called inside the spinlock unlike kfree(), and this was
caught by syzkaller now.

This patch reverts the conversion partially for restoring the kvfree()
call outside the spinlock.  It's not trivial to use guard() in this
context, unfortunately.

Fixes: 84bb065b316e ("ALSA: rawmidi: Use guard() for locking")
Reported-by: syzbot+351f8764833934c68836@syzkaller.appspotmail.com
Reported-by: Eric Dumazet <eric.dumazet@gmail.com>
Closes: https://lore.kernel.org/6744737b.050a0220.1cc393.007e.GAE@google.com
Cc: <stable@vger.kernel.org>
Link: https://patch.msgid.link/20241125142041.16578-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
sound/core/rawmidi.c