public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: Peter Hurley <peter@hurleysoftware.com>
Cc: Gianluca Anzolin <gianluca@sottospazio.it>,
	Gustavo Padovan <gustavo@padovan.org>,
	linux-kernel@vger.kernel.org, jslaby@suse.cz
Subject: Re: [PATCH] Fix refcount leak in tty_port.c
Date: Wed, 24 Jul 2013 15:15:18 -0700	[thread overview]
Message-ID: <20130724221518.GA21709@kroah.com> (raw)
In-Reply-To: <51EFE0A3.80709@hurleysoftware.com>

On Wed, Jul 24, 2013 at 10:11:47AM -0400, Peter Hurley wrote:
> On 07/12/2013 10:04 AM, Peter Hurley wrote:
> >On 07/12/2013 06:30 AM, Gustavo Padovan wrote:
> >>Hi Gianluca,
> >>
> >>* Gianluca Anzolin <gianluca@sottospazio.it> [2013-07-09 10:35:35 +0200]:
> >>
> >>>Hello,
> >>>
> >>>In linux 3.10 in the file drivers/tty/tty_port.c the function
> >>>tty_port_tty_hangup may leak a tty reference:
> >>>
> >>>         struct tty_struct *tty = tty_port_tty_get(port);
> >>>
> >>>         if (tty && (!check_clocal || !C_CLOCAL(tty))) {
> >>>                 tty_hangup(tty);
> >>>                 tty_kref_put(tty);
> >>>         }
> >>>
> >>>If tty != NULL and the second condition is false we never call tty_kref_put and
> >>>the reference is leaked.
> >
> >Good catch.
> >
> >>>Fix by nesting two if statements.
> >>>
> >>>Signed-off-by: Gianluca Anzolin <gianluca@sottospazio.it>
> >>
> >>As mentioned by Gianluca this is a regression of aa27a094 and we depend on
> >>this patch to go ahead with some fixes in the bluetooth subsystem.
> >
> >Gustavo,
> >
> >There's no direct dependency; ie., there aren't merge issues here.
> >We should progress with the fixes to rfcomm independent of this patch.
> >
> >>Gianluca, it might help if you send a proper git inline formated patch,
> >>mentioning the issue and which regression you are fixing.  It makes
> >>maintainer's life easier.
> >
> >As Gustavo points out, please inline the patch otherwise commenters
> >have to do it for you.
> 
> Gianluca,
> 
> I think Greg may be expecting you to address the comments from myself
> and Gustavo before accepting this patch.
> 
> Greg, is that the case?

Yes, I thought a new version was coming, so I dropped this one.  Can
someone please fix this up and resend?

thanks,

greg k-h

  reply	other threads:[~2013-07-24 22:15 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-09  8:35 [PATCH] Fix refcount leak in tty_port.c Gianluca Anzolin
2013-07-12 10:30 ` Gustavo Padovan
2013-07-12 14:04   ` Peter Hurley
2013-07-24 14:11     ` Peter Hurley
2013-07-24 22:15       ` Greg KH [this message]
     [not found] <20130709083535.GA30227>
2013-07-12  9:47 ` Gianluca Anzolin
2013-07-12 15:12   ` Greg KH

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=20130724221518.GA21709@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=gianluca@sottospazio.it \
    --cc=gustavo@padovan.org \
    --cc=jslaby@suse.cz \
    --cc=linux-kernel@vger.kernel.org \
    --cc=peter@hurleysoftware.com \
    /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