aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'kernel')
-rw-r--r--kernel/exit.c10
-rw-r--r--kernel/fork.c4
-rw-r--r--kernel/signal.c2
-rw-r--r--kernel/sys.c14
4 files changed, 15 insertions, 15 deletions
diff --git a/kernel/exit.c b/kernel/exit.c
index cf03a52c3a9a..6e6ec300330f 100644
--- a/kernel/exit.c
+++ b/kernel/exit.c
@@ -299,12 +299,12 @@ void __set_special_pids(pid_t session, pid_t pgrp)
299{ 299{
300 struct task_struct *curr = current->group_leader; 300 struct task_struct *curr = current->group_leader;
301 301
302 if (process_session(curr) != session) { 302 if (task_session_nr(curr) != session) {
303 detach_pid(curr, PIDTYPE_SID); 303 detach_pid(curr, PIDTYPE_SID);
304 set_signal_session(curr->signal, session); 304 set_task_session(curr, session);
305 attach_pid(curr, PIDTYPE_SID, find_pid(session)); 305 attach_pid(curr, PIDTYPE_SID, find_pid(session));
306 } 306 }
307 if (process_group(curr) != pgrp) { 307 if (task_pgrp_nr(curr) != pgrp) {
308 detach_pid(curr, PIDTYPE_PGID); 308 detach_pid(curr, PIDTYPE_PGID);
309 curr->signal->pgrp = pgrp; 309 curr->signal->pgrp = pgrp;
310 attach_pid(curr, PIDTYPE_PGID, find_pid(pgrp)); 310 attach_pid(curr, PIDTYPE_PGID, find_pid(pgrp));
@@ -1091,10 +1091,10 @@ static int eligible_child(pid_t pid, int options, struct task_struct *p)
1091 if (p->pid != pid) 1091 if (p->pid != pid)
1092 return 0; 1092 return 0;
1093 } else if (!pid) { 1093 } else if (!pid) {
1094 if (process_group(p) != process_group(current)) 1094 if (task_pgrp_nr(p) != task_pgrp_nr(current))
1095 return 0; 1095 return 0;
1096 } else if (pid != -1) { 1096 } else if (pid != -1) {
1097 if (process_group(p) != -pid) 1097 if (task_pgrp_nr(p) != -pid)
1098 return 0; 1098 return 0;
1099 } 1099 }
1100 1100
diff --git a/kernel/fork.c b/kernel/fork.c
index 61516b89cb6c..fd65bca38a93 100644
--- a/kernel/fork.c
+++ b/kernel/fork.c
@@ -1283,8 +1283,8 @@ static struct task_struct *copy_process(unsigned long clone_flags,
1283 1283
1284 if (thread_group_leader(p)) { 1284 if (thread_group_leader(p)) {
1285 p->signal->tty = current->signal->tty; 1285 p->signal->tty = current->signal->tty;
1286 p->signal->pgrp = process_group(current); 1286 p->signal->pgrp = task_pgrp_nr(current);
1287 set_signal_session(p->signal, process_session(current)); 1287 set_task_session(p, task_session_nr(current));
1288 attach_pid(p, PIDTYPE_PGID, task_pgrp(current)); 1288 attach_pid(p, PIDTYPE_PGID, task_pgrp(current));
1289 attach_pid(p, PIDTYPE_SID, task_session(current)); 1289 attach_pid(p, PIDTYPE_SID, task_session(current));
1290 1290
diff --git a/kernel/signal.c b/kernel/signal.c
index e4f059cd9867..15c6940ab046 100644
--- a/kernel/signal.c
+++ b/kernel/signal.c
@@ -536,7 +536,7 @@ static int check_kill_permission(int sig, struct siginfo *info,
536 return error; 536 return error;
537 error = -EPERM; 537 error = -EPERM;
538 if (((sig != SIGCONT) || 538 if (((sig != SIGCONT) ||
539 (process_session(current) != process_session(t))) 539 (task_session_nr(current) != task_session_nr(t)))
540 && (current->euid ^ t->suid) && (current->euid ^ t->uid) 540 && (current->euid ^ t->suid) && (current->euid ^ t->uid)
541 && (current->uid ^ t->suid) && (current->uid ^ t->uid) 541 && (current->uid ^ t->suid) && (current->uid ^ t->uid)
542 && !capable(CAP_KILL)) 542 && !capable(CAP_KILL))
diff --git a/kernel/sys.c b/kernel/sys.c
index b8fcbc640193..4cfa213a5ac2 100644
--- a/kernel/sys.c
+++ b/kernel/sys.c
@@ -968,7 +968,7 @@ asmlinkage long sys_setpgid(pid_t pid, pid_t pgid)
968 if (err) 968 if (err)
969 goto out; 969 goto out;
970 970
971 if (process_group(p) != pgid) { 971 if (task_pgrp_nr(p) != pgid) {
972 detach_pid(p, PIDTYPE_PGID); 972 detach_pid(p, PIDTYPE_PGID);
973 p->signal->pgrp = pgid; 973 p->signal->pgrp = pgid;
974 attach_pid(p, PIDTYPE_PGID, find_pid(pgid)); 974 attach_pid(p, PIDTYPE_PGID, find_pid(pgid));
@@ -984,7 +984,7 @@ out:
984asmlinkage long sys_getpgid(pid_t pid) 984asmlinkage long sys_getpgid(pid_t pid)
985{ 985{
986 if (!pid) 986 if (!pid)
987 return process_group(current); 987 return task_pgrp_nr(current);
988 else { 988 else {
989 int retval; 989 int retval;
990 struct task_struct *p; 990 struct task_struct *p;
@@ -996,7 +996,7 @@ asmlinkage long sys_getpgid(pid_t pid)
996 if (p) { 996 if (p) {
997 retval = security_task_getpgid(p); 997 retval = security_task_getpgid(p);
998 if (!retval) 998 if (!retval)
999 retval = process_group(p); 999 retval = task_pgrp_nr(p);
1000 } 1000 }
1001 read_unlock(&tasklist_lock); 1001 read_unlock(&tasklist_lock);
1002 return retval; 1002 return retval;
@@ -1008,7 +1008,7 @@ asmlinkage long sys_getpgid(pid_t pid)
1008asmlinkage long sys_getpgrp(void) 1008asmlinkage long sys_getpgrp(void)
1009{ 1009{
1010 /* SMP - assuming writes are word atomic this is fine */ 1010 /* SMP - assuming writes are word atomic this is fine */
1011 return process_group(current); 1011 return task_pgrp_nr(current);
1012} 1012}
1013 1013
1014#endif 1014#endif
@@ -1016,7 +1016,7 @@ asmlinkage long sys_getpgrp(void)
1016asmlinkage long sys_getsid(pid_t pid) 1016asmlinkage long sys_getsid(pid_t pid)
1017{ 1017{
1018 if (!pid) 1018 if (!pid)
1019 return process_session(current); 1019 return task_session_nr(current);
1020 else { 1020 else {
1021 int retval; 1021 int retval;
1022 struct task_struct *p; 1022 struct task_struct *p;
@@ -1028,7 +1028,7 @@ asmlinkage long sys_getsid(pid_t pid)
1028 if (p) { 1028 if (p) {
1029 retval = security_task_getsid(p); 1029 retval = security_task_getsid(p);
1030 if (!retval) 1030 if (!retval)
1031 retval = process_session(p); 1031 retval = task_session_nr(p);
1032 } 1032 }
1033 read_unlock(&tasklist_lock); 1033 read_unlock(&tasklist_lock);
1034 return retval; 1034 return retval;
@@ -1065,7 +1065,7 @@ asmlinkage long sys_setsid(void)
1065 group_leader->signal->tty = NULL; 1065 group_leader->signal->tty = NULL;
1066 spin_unlock(&group_leader->sighand->siglock); 1066 spin_unlock(&group_leader->sighand->siglock);
1067 1067
1068 err = process_group(group_leader); 1068 err = task_pgrp_nr(group_leader);
1069out: 1069out:
1070 write_unlock_irq(&tasklist_lock); 1070 write_unlock_irq(&tasklist_lock);
1071 return err; 1071 return err;