lkml.org 
[lkml]   [2010]   [Apr]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[PATCH 1/1] tty: release_one_tty() forgets to put pids
    release_one_tty(tty) can be called when tty still has a reference
    to pgrp/session. In this case we leak the pid.

    The patch needs the ack from someone who understand tty magic.

    Signed-off-by: Oleg Nesterov <oleg@redhat.com>
    ---

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

    --- TTT/drivers/char/tty_io.c~TTY_PID_LEAK 2010-03-17 16:00:59.000000000 +0100
    +++ TTT/drivers/char/tty_io.c 2010-04-02 17:23:07.000000000 +0200
    @@ -1423,6 +1423,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-02 18:09    [W:4.062 / U:0.848 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site