Re: [PATCH] tty_port: Fix refcounting leak in tty_port_tty_hangup()

2013-07-25 Thread Gianluca Anzolin
On Thu, Jul 25, 2013 at 10:14:36AM +0200, Gianluca Anzolin wrote: > On Thu, Jul 25, 2013 at 08:26:45AM +0200, Jiri Slaby wrote: > > On 07/25/2013 07:26 AM, Gianluca Anzolin wrote: > > > The function tty_port_tty_hangup() could leak a reference to the > > > tty_struct: > > > > > > struct t

Re: [PATCH] tty_port: Fix refcounting leak in tty_port_tty_hangup()

2013-07-25 Thread Gianluca Anzolin
On Thu, Jul 25, 2013 at 08:26:45AM +0200, Jiri Slaby wrote: > On 07/25/2013 07:26 AM, Gianluca Anzolin wrote: > > The function tty_port_tty_hangup() could leak a reference to the tty_struct: > > > > struct tty_struct *tty = tty_port_tty_get(port); > > > > if (tty && (!check_clocal

Re: [PATCH] tty_port: Fix refcounting leak in tty_port_tty_hangup()

2013-07-24 Thread Jiri Slaby
On 07/25/2013 07:26 AM, Gianluca Anzolin wrote: > The function tty_port_tty_hangup() could leak a reference to the tty_struct: > > struct tty_struct *tty = tty_port_tty_get(port); > > if (tty && (!check_clocal || !C_CLOCAL(tty))) { > tty_hangup(tty); >

[PATCH] tty_port: Fix refcounting leak in tty_port_tty_hangup()

2013-07-24 Thread Gianluca Anzolin
The function tty_port_tty_hangup() could leak a reference to the tty_struct: 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 secon