diff options
Diffstat (limited to 'drivers/char/tty_io.c')
-rw-r--r-- | drivers/char/tty_io.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/char/tty_io.c b/drivers/char/tty_io.c index 8a2d26e98ac4..4ebba7ca1dc9 100644 --- a/drivers/char/tty_io.c +++ b/drivers/char/tty_io.c | |||
@@ -1511,7 +1511,7 @@ void disassociate_ctty(int on_exit) | |||
1511 | 1511 | ||
1512 | spin_lock_irq(¤t->sighand->siglock); | 1512 | spin_lock_irq(¤t->sighand->siglock); |
1513 | current->signal->tty_old_pgrp = 0; | 1513 | current->signal->tty_old_pgrp = 0; |
1514 | session = current->signal->session; | 1514 | session = process_session(current); |
1515 | spin_unlock_irq(¤t->sighand->siglock); | 1515 | spin_unlock_irq(¤t->sighand->siglock); |
1516 | 1516 | ||
1517 | mutex_lock(&tty_mutex); | 1517 | mutex_lock(&tty_mutex); |
@@ -2897,7 +2897,7 @@ static int tiocsctty(struct tty_struct *tty, int arg) | |||
2897 | { | 2897 | { |
2898 | int ret = 0; | 2898 | int ret = 0; |
2899 | if (current->signal->leader && | 2899 | if (current->signal->leader && |
2900 | (current->signal->session == tty->session)) | 2900 | (process_session(current) == tty->session)) |
2901 | return ret; | 2901 | return ret; |
2902 | 2902 | ||
2903 | mutex_lock(&tty_mutex); | 2903 | mutex_lock(&tty_mutex); |
@@ -2979,13 +2979,13 @@ static int tiocspgrp(struct tty_struct *tty, struct tty_struct *real_tty, pid_t | |||
2979 | return retval; | 2979 | return retval; |
2980 | if (!current->signal->tty || | 2980 | if (!current->signal->tty || |
2981 | (current->signal->tty != real_tty) || | 2981 | (current->signal->tty != real_tty) || |
2982 | (real_tty->session != current->signal->session)) | 2982 | (real_tty->session != process_session(current))) |
2983 | return -ENOTTY; | 2983 | return -ENOTTY; |
2984 | if (get_user(pgrp, p)) | 2984 | if (get_user(pgrp, p)) |
2985 | return -EFAULT; | 2985 | return -EFAULT; |
2986 | if (pgrp < 0) | 2986 | if (pgrp < 0) |
2987 | return -EINVAL; | 2987 | return -EINVAL; |
2988 | if (session_of_pgrp(pgrp) != current->signal->session) | 2988 | if (session_of_pgrp(pgrp) != process_session(current)) |
2989 | return -EPERM; | 2989 | return -EPERM; |
2990 | real_tty->pgrp = pgrp; | 2990 | real_tty->pgrp = pgrp; |
2991 | return 0; | 2991 | return 0; |
@@ -3338,7 +3338,7 @@ static void __do_SAK(struct work_struct *work) | |||
3338 | /* Kill the entire session */ | 3338 | /* Kill the entire session */ |
3339 | do_each_task_pid(session, PIDTYPE_SID, p) { | 3339 | do_each_task_pid(session, PIDTYPE_SID, p) { |
3340 | printk(KERN_NOTICE "SAK: killed process %d" | 3340 | printk(KERN_NOTICE "SAK: killed process %d" |
3341 | " (%s): p->signal->session==tty->session\n", | 3341 | " (%s): process_session(p)==tty->session\n", |
3342 | p->pid, p->comm); | 3342 | p->pid, p->comm); |
3343 | send_sig(SIGKILL, p, 1); | 3343 | send_sig(SIGKILL, p, 1); |
3344 | } while_each_task_pid(session, PIDTYPE_SID, p); | 3344 | } while_each_task_pid(session, PIDTYPE_SID, p); |
@@ -3348,7 +3348,7 @@ static void __do_SAK(struct work_struct *work) | |||
3348 | do_each_thread(g, p) { | 3348 | do_each_thread(g, p) { |
3349 | if (p->signal->tty == tty) { | 3349 | if (p->signal->tty == tty) { |
3350 | printk(KERN_NOTICE "SAK: killed process %d" | 3350 | printk(KERN_NOTICE "SAK: killed process %d" |
3351 | " (%s): p->signal->session==tty->session\n", | 3351 | " (%s): process_session(p)==tty->session\n", |
3352 | p->pid, p->comm); | 3352 | p->pid, p->comm); |
3353 | send_sig(SIGKILL, p, 1); | 3353 | send_sig(SIGKILL, p, 1); |
3354 | continue; | 3354 | continue; |