lkml.org 
[lkml]   [2010]   [Apr]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[041/197] tty: release_one_tty() forgets to put pids
    2.6.32-stable review patch.  If anyone has any objections, please let us know.

    ------------------

    From: Oleg Nesterov <oleg@redhat.com>

    commit 6da8d866d0d39e9509ff826660f6a86a6757c966 upstream.

    release_one_tty(tty) can be called when tty still has a reference
    to pgrp/session. In this case we leak the pid.

    Signed-off-by: Oleg Nesterov <oleg@redhat.com>
    Reported-by: Catalin Marinas <catalin.marinas@arm.com>
    Reported-and-tested-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
    Acked-by: Linus Torvalds <torvalds@linux-foundation.org>
    Acked-by: Eric W. Biederman <ebiederm@xmission.com>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

    ---
    drivers/char/tty_io.c | 2 ++
    1 file changed, 2 insertions(+)

    --- a/drivers/char/tty_io.c
    +++ b/drivers/char/tty_io.c
    @@ -1408,6 +1408,8 @@ static void release_one_tty(struct work_
    list_del_init(&tty->tty_files);
    file_list_unlock();

    + put_pid(tty->pgrp);
    + put_pid(tty->session);
    free_tty_struct(tty);
    }




    \
     
     \ /
      Last update: 2010-04-22 22:51    [W:2.098 / U:0.484 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site