]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/char/tty_io.c
Merge ssh://master.kernel.org/pub/scm/linux/kernel/git/tglx/linux-2.6-x86
[linux-2.6-omap-h63xx.git] / drivers / char / tty_io.c
index 9820f86831eea14ce715ca62275b4e71819f69c0..13a53575a0164bf82ea5716c7c1d5fbc30b8cbbf 100644 (file)
 #include <linux/selection.h>
 
 #include <linux/kmod.h>
+#include <linux/nsproxy.h>
 
 #undef TTY_DEBUG_HANGUP
 
@@ -3107,7 +3108,7 @@ static int tiocgpgrp(struct tty_struct *tty, struct tty_struct *real_tty, pid_t
         */
        if (tty == real_tty && current->signal->tty != real_tty)
                return -ENOTTY;
-       return put_user(pid_nr(real_tty->pgrp), p);
+       return put_user(pid_vnr(real_tty->pgrp), p);
 }
 
 /**
@@ -3141,7 +3142,7 @@ static int tiocspgrp(struct tty_struct *tty, struct tty_struct *real_tty, pid_t
        if (pgrp_nr < 0)
                return -EINVAL;
        rcu_read_lock();
-       pgrp = find_pid(pgrp_nr);
+       pgrp = find_vpid(pgrp_nr);
        retval = -ESRCH;
        if (!pgrp)
                goto out_unlock;
@@ -3178,7 +3179,7 @@ static int tiocgsid(struct tty_struct *tty, struct tty_struct *real_tty, pid_t _
                return -ENOTTY;
        if (!real_tty->session)
                return -ENOTTY;
-       return put_user(pid_nr(real_tty->session), p);
+       return put_user(pid_vnr(real_tty->session), p);
 }
 
 /**
@@ -3529,7 +3530,7 @@ void __do_SAK(struct tty_struct *tty)
        do_each_pid_task(session, PIDTYPE_SID, p) {
                printk(KERN_NOTICE "SAK: killed process %d"
                        " (%s): task_session_nr(p)==tty->session\n",
-                       p->pid, p->comm);
+                       task_pid_nr(p), p->comm);
                send_sig(SIGKILL, p, 1);
        } while_each_pid_task(session, PIDTYPE_SID, p);
        /* Now kill any processes that happen to have the
@@ -3539,7 +3540,7 @@ void __do_SAK(struct tty_struct *tty)
                if (p->signal->tty == tty) {
                        printk(KERN_NOTICE "SAK: killed process %d"
                            " (%s): task_session_nr(p)==tty->session\n",
-                           p->pid, p->comm);
+                           task_pid_nr(p), p->comm);
                        send_sig(SIGKILL, p, 1);
                        continue;
                }
@@ -3559,7 +3560,7 @@ void __do_SAK(struct tty_struct *tty)
                                    filp->private_data == tty) {
                                        printk(KERN_NOTICE "SAK: killed process %d"
                                            " (%s): fd#%d opened to the tty\n",
-                                           p->pid, p->comm, i);
+                                           task_pid_nr(p), p->comm, i);
                                        force_sig(SIGKILL, p);
                                        break;
                                }