lkml.org 
[lkml]   [2009]   [Jun]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 1/2] ldisc: Make sure the ldisc isn't active when we close it
    Date
    From: Alan Cox <alan@linux.intel.com>

    Signed-off-by: Alan Cox <alan@linux.intel.com>
    ---

    drivers/char/tty_ldisc.c | 2 ++
    1 files changed, 2 insertions(+), 0 deletions(-)


    diff --git a/drivers/char/tty_ldisc.c b/drivers/char/tty_ldisc.c
    index 94b3e06..874c248 100644
    --- a/drivers/char/tty_ldisc.c
    +++ b/drivers/char/tty_ldisc.c
    @@ -793,6 +793,8 @@ void tty_ldisc_hangup(struct tty_struct *tty)
    /* Avoid racing set_ldisc */
    mutex_lock(&tty->ldisc_mutex);
    /* Switch back to N_TTY */
    + tty_ldisc_halt(tty);
    + tty_ldisc_wait_idle(tty);
    tty_ldisc_reinit(tty);
    /* At this point we have a closed ldisc and we want to
    reopen it. We could defer this to the next open but


    \
     
     \ /
      Last update: 2009-06-15 16:37    [W:0.043 / U:30.156 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site