diff options
Diffstat (limited to 'drivers/char/tty_io.c')
-rw-r--r-- | drivers/char/tty_io.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/char/tty_io.c b/drivers/char/tty_io.c index 9820f86831ee..e40544947135 100644 --- a/drivers/char/tty_io.c +++ b/drivers/char/tty_io.c | |||
@@ -103,6 +103,7 @@ | |||
103 | #include <linux/selection.h> | 103 | #include <linux/selection.h> |
104 | 104 | ||
105 | #include <linux/kmod.h> | 105 | #include <linux/kmod.h> |
106 | #include <linux/nsproxy.h> | ||
106 | 107 | ||
107 | #undef TTY_DEBUG_HANGUP | 108 | #undef TTY_DEBUG_HANGUP |
108 | 109 | ||
@@ -3107,7 +3108,7 @@ static int tiocgpgrp(struct tty_struct *tty, struct tty_struct *real_tty, pid_t | |||
3107 | */ | 3108 | */ |
3108 | if (tty == real_tty && current->signal->tty != real_tty) | 3109 | if (tty == real_tty && current->signal->tty != real_tty) |
3109 | return -ENOTTY; | 3110 | return -ENOTTY; |
3110 | return put_user(pid_nr(real_tty->pgrp), p); | 3111 | return put_user(pid_vnr(real_tty->pgrp), p); |
3111 | } | 3112 | } |
3112 | 3113 | ||
3113 | /** | 3114 | /** |
@@ -3141,7 +3142,7 @@ static int tiocspgrp(struct tty_struct *tty, struct tty_struct *real_tty, pid_t | |||
3141 | if (pgrp_nr < 0) | 3142 | if (pgrp_nr < 0) |
3142 | return -EINVAL; | 3143 | return -EINVAL; |
3143 | rcu_read_lock(); | 3144 | rcu_read_lock(); |
3144 | pgrp = find_pid(pgrp_nr); | 3145 | pgrp = find_vpid(pgrp_nr); |
3145 | retval = -ESRCH; | 3146 | retval = -ESRCH; |
3146 | if (!pgrp) | 3147 | if (!pgrp) |
3147 | goto out_unlock; | 3148 | goto out_unlock; |
@@ -3178,7 +3179,7 @@ static int tiocgsid(struct tty_struct *tty, struct tty_struct *real_tty, pid_t _ | |||
3178 | return -ENOTTY; | 3179 | return -ENOTTY; |
3179 | if (!real_tty->session) | 3180 | if (!real_tty->session) |
3180 | return -ENOTTY; | 3181 | return -ENOTTY; |
3181 | return put_user(pid_nr(real_tty->session), p); | 3182 | return put_user(pid_vnr(real_tty->session), p); |
3182 | } | 3183 | } |
3183 | 3184 | ||
3184 | /** | 3185 | /** |