From: Takashi Iwai <tiwai@suse.de>
To: "Andrey Konovalov" <andreyknvl@gmail.com>
Cc: <alsa-devel@alsa-project.org>,
"Clemens Ladisch" <clemens@ladisch.de>,
"Jaroslav Kysela" <perex@perex.cz>,
<linux-kernel@vger.kernel.org>, <dvyukov@google.com>,
<glider@google.com>, <kcc@google.com>
Subject: Re: [PATCH] midi: avoid freeing umidi object twice
Date: Sat, 13 Feb 2016 09:41:11 +0100 [thread overview]
Message-ID: <s5hoabldmu0.wl-tiwai@suse.de> (raw)
In-Reply-To: <1455350886-21126-1-git-send-email-andreyknvl@gmail.com>
On Sat, 13 Feb 2016 09:08:06 +0100,
Andrey Konovalov wrote:
>
> 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.
>
> Acked-by: Clemens Ladisch <clemens@ladisch.de>
> Signed-off-by: Andrey Konovalov <andreyknvl@gmail.com>
Thanks, applied now with Cc to stable.
Takashi
> ---
> sound/usb/midi.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/sound/usb/midi.c b/sound/usb/midi.c
> index cc39f63..007cf58 100644
> --- a/sound/usb/midi.c
> +++ b/sound/usb/midi.c
> @@ -2455,7 +2455,6 @@ int snd_usbmidi_create(struct snd_card *card,
> else
> err = snd_usbmidi_create_endpoints(umidi, endpoints);
> if (err < 0) {
> - snd_usbmidi_free(umidi);
> return err;
> }
>
> --
> 1.9.1
>
>
prev parent reply other threads:[~2016-02-13 8:41 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-13 8:08 Andrey Konovalov
2016-02-13 8:41 ` Takashi Iwai [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=s5hoabldmu0.wl-tiwai@suse.de \
--to=tiwai@suse.de \
--cc=alsa-devel@alsa-project.org \
--cc=andreyknvl@gmail.com \
--cc=clemens@ladisch.de \
--cc=dvyukov@google.com \
--cc=glider@google.com \
--cc=kcc@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=perex@perex.cz \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®