From: Peter Hurley <peter@hurleysoftware.com>
To: channing <chao.bi@intel.com>
Cc: gregkh@linuxfoundation.org, jslaby@suse.cz, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] TTY: memory leakage in tty_buffer_find()
Date: Wed, 26 Jun 2013 08:43:09 -0400 [thread overview]
Message-ID: <51CAE1DD.8070301@hurleysoftware.com> (raw)
In-Reply-To: <1372236670.2390.12.camel@bichao>
On 06/26/2013 04:51 AM, channing wrote:
>
> In tty_buffer_find(), it scans all tty buffers in
> free buffer queue, if it finds matched one,
> tty->buf.free will point to matched one's next buffer,
> so tty buffers that ahead of matched one are removed
> from free queue, they will never be used but they
> are not released, then memory leak happen.
Actually, the whole scan loop is wrong: only tty buffers of
size 256 are added to the free list.
So this can't leak because a buffer will never be found
mid-list.
Greg has a patch series from me that reduces this but it's not
yet in next.
Regards,
Peter Hurley
next prev parent reply other threads:[~2013-06-26 12:43 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-26 8:51 [PATCH] TTY: memory leakage in tty_buffer_find() channing
2013-06-26 8:55 ` Jiri Slaby
2013-06-26 9:01 ` Jiri Slaby
2013-06-26 12:43 ` Peter Hurley [this message]
2013-06-27 2:37 ` channing
2013-06-27 12:44 ` Peter Hurley
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=51CAE1DD.8070301@hurleysoftware.com \
--to=peter@hurleysoftware.com \
--cc=chao.bi@intel.com \
--cc=gregkh@linuxfoundation.org \
--cc=jslaby@suse.cz \
--cc=linux-kernel@vger.kernel.org \
/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