Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=2ea81868d8fba0bb56d7b45a08cc5f15dd2c6bb2 Commit: 2ea81868d8fba0bb56d7b45a08cc5f15dd2c6bb2 Parent: 680a96710041c3c25464b5e093b80ca43cb94f52 Author: Eric W. Biederman <[EMAIL PROTECTED]> AuthorDate: Mon Feb 12 00:52:53 2007 -0800 Committer: Linus Torvalds <[EMAIL PROTECTED]> CommitDate: Mon Feb 12 09:48:31 2007 -0800
[PATCH] tty: fix the locking for signal->session in disassociate_ctty commit 24ec839c431eb79bb8f6abc00c4e1eb3b8c4d517 while fixing the locking for signal->tty got the locking wrong for signal->session. This places our accesses of signal->session back under the tasklist_lock where they belong. Signed-off-by: Eric W. Biederman <[EMAIL PROTECTED]> Cc: Alan Cox <[EMAIL PROTECTED]> Cc: Oleg Nesterov <[EMAIL PROTECTED]> Signed-off-by: Andrew Morton <[EMAIL PROTECTED]> Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]> --- drivers/char/tty_io.c | 4 +--- 1 files changed, 1 insertions(+), 3 deletions(-) diff --git a/drivers/char/tty_io.c b/drivers/char/tty_io.c index ac937f7..abfe24d 100644 --- a/drivers/char/tty_io.c +++ b/drivers/char/tty_io.c @@ -1496,7 +1496,6 @@ void disassociate_ctty(int on_exit) { struct tty_struct *tty; int tty_pgrp = -1; - int session; lock_kernel(); @@ -1530,7 +1529,6 @@ void disassociate_ctty(int on_exit) spin_lock_irq(¤t->sighand->siglock); current->signal->tty_old_pgrp = 0; - session = process_session(current); spin_unlock_irq(¤t->sighand->siglock); mutex_lock(&tty_mutex); @@ -1549,7 +1547,7 @@ void disassociate_ctty(int on_exit) /* Now clear signal->tty under the lock */ read_lock(&tasklist_lock); - session_clear_tty(session); + session_clear_tty(process_session(current)); read_unlock(&tasklist_lock); unlock_kernel(); } - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html