linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johan Hovold <jhovold@gmail.com>
To: Lennart Sorensen <lsorense@csclub.uwaterloo.ca>
Cc: linux-kernel@vger.kernel.org, "Bjørn Mork" <bjorn@mork.no>,
	linux@sierrawireless.com, linux-usb@vger.kernel.org,
	"Greg KH" <gregkh@linuxfoundation.org>
Subject: Re: Fix memory leak in sierra_release() (this time with signed-off-by)
Date: Wed, 24 Oct 2012 16:56:44 +0200	[thread overview]
Message-ID: <20121024145644.GB3131@localhost> (raw)
In-Reply-To: <20121024142309.GQ18610@csclub.uwaterloo.ca>

On Wed, Oct 24, 2012 at 10:23:09AM -0400, Lennart Sorensen wrote:
> I found a memory leak in sierra_release() (well sierra_probe() I guess)
> that looses 8 bytes each time the driver releases a device.

Good catch! I missed this one when I fixed a bunch of other memory
leaks in the sierra with recent kernels:

	http://marc.info/?l=linux-usb&m=135100550421848&w=2

I'll rebase my patch on top of this one as your patch should be
backported to all stable kernels, whereas mine is only required for
v3.6 and later.

> Signed-off-by: Len Sorensen <lsorense@csclub.uwaterloo.ca>

Cc: <stable@vger.kernel.org>
Acked-by: Johan Hovold <jhovold@gmail.com>

Thanks,
Johan


> diff --git a/drivers/usb/serial/sierra.c b/drivers/usb/serial/sierra.c
> index 01d882c..76ef95b 100644
> --- a/drivers/usb/serial/sierra.c
> +++ b/drivers/usb/serial/sierra.c
> @@ -959,6 +959,7 @@ static void sierra_release(struct usb_serial *serial)
>  			continue;
>  		kfree(portdata);
>  	}
> +	kfree(serial->private);
>  }
>  
>  #ifdef CONFIG_PM

  reply	other threads:[~2012-10-24 14:57 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-24 14:23 Fix memory leak in sierra_release() (this time with signed-off-by) Lennart Sorensen
2012-10-24 14:56 ` Johan Hovold [this message]
2012-10-24 16:06   ` Lennart Sorensen

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=20121024145644.GB3131@localhost \
    --to=jhovold@gmail.com \
    --cc=bjorn@mork.no \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=linux@sierrawireless.com \
    --cc=lsorense@csclub.uwaterloo.ca \
    /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;
as well as URLs for NNTP newsgroup(s).