Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: Takashi Sakamoto  <o-takashi@sakamocchi.jp>
Cc: Wenwen Wang <wenwen@cs.uga.edu>,
	"moderated list:FIREWIRE AUDIO DRIVERS"
	<alsa-devel@alsa-project.org>,
	Clemens Ladisch <clemens@ladisch.de>,
	Takashi Iwai <tiwai@suse.com>,
	open list <linux-kernel@vger.kernel.org>
Subject: Re: [alsa-devel] [PATCH] ALSA: firewire: fix a memory leak bug
Date: Thu, 08 Aug 2019 11:12:49 +0200	[thread overview]
Message-ID: <s5hftmcja0e.wl-tiwai@suse.de> (raw)
In-Reply-To: <ce36089b-7061-4cd1-8262-eb3393c753af@www.fastmail.com>

On Thu, 08 Aug 2019 11:04:03 +0200,
 Takashi Sakamoto  wrote:
> 
> 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+

Applied, thanks.


Takashi

      reply	other threads:[~2019-08-08  9:12 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-08  5:50 [PATCH] ALSA: firewire: fix a memory leak bug Wenwen Wang
2019-08-08  9:04 ` [alsa-devel] " Takashi Sakamoto
2019-08-08  9:12   ` 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=s5hftmcja0e.wl-tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=clemens@ladisch.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=o-takashi@sakamocchi.jp \
    --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