aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/exit.c
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2008-11-13 18:39:16 -0500
committerJames Morris <jmorris@namei.org>2008-11-13 18:39:16 -0500
commitb6dff3ec5e116e3af6f537d4caedcad6b9e5082a (patch)
tree9e76f972eb7ce9b84e0146c8e4126a3f86acb428 /kernel/exit.c
parent15a2460ed0af7538ca8e6c610fe607a2cd9da142 (diff)
CRED: Separate task security context from task_struct
Separate the task security context from task_struct. At this point, the security data is temporarily embedded in the task_struct with two pointers pointing to it. Note that the Alpha arch is altered as it refers to (E)UID and (E)GID in entry.S via asm-offsets. With comment fixes Signed-off-by: Marc Dionne <marc.c.dionne@gmail.com> Signed-off-by: David Howells <dhowells@redhat.com> Acked-by: James Morris <jmorris@namei.org> Acked-by: Serge Hallyn <serue@us.ibm.com> Signed-off-by: James Morris <jmorris@namei.org>
Diffstat (limited to 'kernel/exit.c')
-rw-r--r--kernel/exit.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/kernel/exit.c b/kernel/exit.c
index 80137a5d9467..e0f6e1892fb9 100644
--- a/kernel/exit.c
+++ b/kernel/exit.c
@@ -160,7 +160,7 @@ void release_task(struct task_struct * p)
160 int zap_leader; 160 int zap_leader;
161repeat: 161repeat:
162 tracehook_prepare_release_task(p); 162 tracehook_prepare_release_task(p);
163 atomic_dec(&p->user->processes); 163 atomic_dec(&p->cred->user->processes);
164 proc_flush_task(p); 164 proc_flush_task(p);
165 write_lock_irq(&tasklist_lock); 165 write_lock_irq(&tasklist_lock);
166 tracehook_finish_release_task(p); 166 tracehook_finish_release_task(p);
@@ -1272,7 +1272,7 @@ static int wait_task_zombie(struct task_struct *p, int options,
1272 return 0; 1272 return 0;
1273 1273
1274 if (unlikely(options & WNOWAIT)) { 1274 if (unlikely(options & WNOWAIT)) {
1275 uid_t uid = p->uid; 1275 uid_t uid = p->cred->uid;
1276 int exit_code = p->exit_code; 1276 int exit_code = p->exit_code;
1277 int why, status; 1277 int why, status;
1278 1278
@@ -1393,7 +1393,7 @@ static int wait_task_zombie(struct task_struct *p, int options,
1393 if (!retval && infop) 1393 if (!retval && infop)
1394 retval = put_user(pid, &infop->si_pid); 1394 retval = put_user(pid, &infop->si_pid);
1395 if (!retval && infop) 1395 if (!retval && infop)
1396 retval = put_user(p->uid, &infop->si_uid); 1396 retval = put_user(p->cred->uid, &infop->si_uid);
1397 if (!retval) 1397 if (!retval)
1398 retval = pid; 1398 retval = pid;
1399 1399
@@ -1458,7 +1458,7 @@ static int wait_task_stopped(int ptrace, struct task_struct *p,
1458 if (!unlikely(options & WNOWAIT)) 1458 if (!unlikely(options & WNOWAIT))
1459 p->exit_code = 0; 1459 p->exit_code = 0;
1460 1460
1461 uid = p->uid; 1461 uid = p->cred->uid;
1462unlock_sig: 1462unlock_sig:
1463 spin_unlock_irq(&p->sighand->siglock); 1463 spin_unlock_irq(&p->sighand->siglock);
1464 if (!exit_code) 1464 if (!exit_code)
@@ -1535,7 +1535,7 @@ static int wait_task_continued(struct task_struct *p, int options,
1535 spin_unlock_irq(&p->sighand->siglock); 1535 spin_unlock_irq(&p->sighand->siglock);
1536 1536
1537 pid = task_pid_vnr(p); 1537 pid = task_pid_vnr(p);
1538 uid = p->uid; 1538 uid = p->cred->uid;
1539 get_task_struct(p); 1539 get_task_struct(p);
1540 read_unlock(&tasklist_lock); 1540 read_unlock(&tasklist_lock);
1541 1541