From: Jiri Slaby <jslaby@suse.cz>
To: channing <chao.bi@intel.com>, gregkh@linuxfoundation.org
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] TTY: memory leakage in tty_buffer_find()
Date: Wed, 26 Jun 2013 10:55:36 +0200 [thread overview]
Message-ID: <51CAAC88.7070106@suse.cz> (raw)
In-Reply-To: <1372236670.2390.12.camel@bichao>
On 06/26/2013 10: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,
Oh, how is that true? tbh is moved with every iteration, right? Then:
*tbh = t->next;
't' is what we return, 't->next' is the next one and '*tbh' is where
'next' of the previous one will point. So we just set it so we remove
't' from the list, or am I missing something?
--
js
suse labs
next prev parent reply other threads:[~2013-06-26 8:55 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 [this message]
2013-06-26 9:01 ` Jiri Slaby
2013-06-26 12:43 ` Peter Hurley
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=51CAAC88.7070106@suse.cz \
--to=jslaby@suse.cz \
--cc=chao.bi@intel.com \
--cc=gregkh@linuxfoundation.org \
--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