Skip to contentSkip to conversation

Patch "ALSA: usb-audio: avoid freeing umidi object twice" has been added to the 4.3-stable tree

PATCH [email protected] 1 participant 1 message Feb 14, 2016

Subsystems (3)
lore
Share & tools
lore

[email protected]

author maintainer Applied
#0 lore raw

This is a note to let you know that I've just added the patch titled

ALSA: usb-audio: avoid freeing umidi object twice

to the 4.3-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
alsa-usb-audio-avoid-freeing-umidi-object-twice.patch
and it can be found in the queue-4.3 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.

Quoted 1 line

From 07d86ca93db7e5cdf4743564d98292042ec21af7 Mon Sep 17 00:00:00 2001

From: Andrey Konovalov <[email protected]>
Date: Sat, 13 Feb 2016 11:08:06 +0300
Subject: ALSA: usb-audio: avoid freeing umidi object twice

From: Andrey Konovalov <[email protected]>

commit 07d86ca93db7e5cdf4743564d98292042ec21af7 upstream.

The 'umidi' object will be free'd on the error path by snd_usbmidi_free() when tearing down the rawmidi interface. So we shouldn't try to free it in snd_usbmidi_create() after having registered the rawmidi interface.

Found by KASAN.

---
 sound/usb/midi.c |    1 -
 1 file changed, 1 deletion(-)
sound/usb/midi.c +0 -1
@@ -2451,7 +2451,6 @@ int snd_usbmidi_create(struct snd_card *
 	else
 		err = snd_usbmidi_create_endpoints(umidi, endpoints);
 	if (err < 0) {
-		snd_usbmidi_free(umidi);
 		return err;
 	}
 

Patches currently in stable-queue which might be from [email protected] are

queue-4.3/alsa-usb-audio-avoid-freeing-umidi-object-twice.patch