From: "Takashi Sakamoto" <o-takashi@sakamocchi.jp>
To: "Wenwen Wang" <wenwen@cs.uga.edu>
Cc: "open list" <linux-kernel@vger.kernel.org>,
"moderated list:FIREWIRE AUDIO DRIVERS"
<alsa-devel@alsa-project.org>,
"Clemens Ladisch" <clemens@ladisch.de>,
"Takashi Iwai" <tiwai@suse.com>
Subject: Re: [alsa-devel] [PATCH] ALSA: firewire: fix a memory leak bug
Date: Thu, 08 Aug 2019 18:04:03 +0900 [thread overview]
Message-ID: <ce36089b-7061-4cd1-8262-eb3393c753af@www.fastmail.com> (raw)
In-Reply-To: <1565243458-2771-1-git-send-email-wenwen@cs.uga.edu>
Hi,
On Thu, Aug 8, 2019, at 14:53, Wenwen Wang wrote:
> In iso_packets_buffer_init(), 'b->packets' is allocated through
> kmalloc_array(). Then, the aligned packet size is checked. If it is
> larger than PAGE_SIZE, -EINVAL will be returned to indicate the error.
> However, the allocated 'b->packets' is not deallocated on this path,
> leading to a memory leak.
>
> To fix the above issue, free 'b->packets' before returning the error code.
>
> Signed-off-by: Wenwen Wang <wenwen@cs.uga.edu>
> ---
> sound/firewire/packets-buffer.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Reviewed-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
And this bug exists till its first commit for v2.6.39.
Fixes: 31ef9134eb52 ("ALSA: add LaCie FireWire Speakers/Griffin FireWave Surround driver")
Cc: <stable@vger.kernel.org> # v2.6.39+
Thanks
Takashi Sakamoto
next prev parent reply other threads:[~2019-08-08 9:04 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-08 5:50 Wenwen Wang
2019-08-08 9:04 ` Takashi Sakamoto [this message]
2019-08-08 9:12 ` [alsa-devel] " Takashi Iwai
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=ce36089b-7061-4cd1-8262-eb3393c753af@www.fastmail.com \
--to=o-takashi@sakamocchi.jp \
--cc=alsa-devel@alsa-project.org \
--cc=clemens@ladisch.de \
--cc=linux-kernel@vger.kernel.org \
--cc=tiwai@suse.com \
--cc=wenwen@cs.uga.edu \
/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®