Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 154504
b: refs/heads/master
c: aef29bc
h: refs/heads/master
v: v3
  • Loading branch information
Alan Cox authored and Linus Torvalds committed Jun 29, 2009
1 parent 914c1b3 commit bb3fdaa
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 52989765629e7d182b4f146050ebba0abf2cb0b7
refs/heads/master: aef29bc2603014cb28dfe39bab8d888546fe18e7
15 changes: 11 additions & 4 deletions trunk/drivers/char/tty_ldisc.c
Original file line number Diff line number Diff line change
Expand Up @@ -867,15 +867,22 @@ void tty_ldisc_release(struct tty_struct *tty, struct tty_struct *o_tty)
tty_ldisc_wait_idle(tty);

/*
* Shutdown the current line discipline, and reset it to N_TTY.
*
* FIXME: this MUST get fixed for the new reflocking
* Now kill off the ldisc
*/
tty_ldisc_close(tty, tty->ldisc);
tty_ldisc_put(tty->ldisc);
/* Force an oops if we mess this up */
tty->ldisc = NULL;

/* Ensure the next open requests the N_TTY ldisc */
tty_set_termios_ldisc(tty, N_TTY);

tty_ldisc_reinit(tty);
/* This will need doing differently if we need to lock */
if (o_tty)
tty_ldisc_release(o_tty, NULL);

/* And the memory resources remaining (buffers, termios) will be
disposed of when the kref hits zero */
}

/**
Expand Down

0 comments on commit bb3fdaa

Please sign in to comment.