From 5281759a9bbd8316e741ef93c15e98dd5849a5b1 Mon Sep 17 00:00:00 2001 From: Oleg Nesterov Date: Thu, 3 May 2012 15:44:17 +1000 Subject: [PATCH] keys: kill task_struct->replacement_session_keyring Kill the no longer used task_struct->replacement_session_keyring, update copy_creds() and exit_creds(). Signed-off-by: Oleg Nesterov Acked-by: David Howells Cc: Thomas Gleixner Cc: Richard Kuo Cc: Linus Torvalds Cc: Alexander Gordeev Cc: Chris Zankel Cc: David Smith Cc: "Frank Ch. Eigler" Cc: Geert Uytterhoeven Cc: Larry Woodman Cc: Peter Zijlstra Cc: Tejun Heo Cc: Ingo Molnar Signed-off-by: Andrew Morton --- include/linux/sched.h | 2 -- kernel/cred.c | 9 --------- 2 files changed, 11 deletions(-) diff --git a/include/linux/sched.h b/include/linux/sched.h index 25c7f3b038ca..055b7435dd46 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h @@ -1412,8 +1412,6 @@ struct task_struct { * credentials (COW) */ const struct cred __rcu *cred; /* effective (overridable) subjective task * credentials (COW) */ - struct cred *replacement_session_keyring; /* for KEYCTL_SESSION_TO_PARENT */ - char comm[TASK_COMM_LEN]; /* executable name excluding path - access with [gs]et_task_comm (which lock it with task_lock()) diff --git a/kernel/cred.c b/kernel/cred.c index e70683d9ec32..95707360c0bc 100644 --- a/kernel/cred.c +++ b/kernel/cred.c @@ -198,13 +198,6 @@ void exit_creds(struct task_struct *tsk) validate_creds(cred); alter_cred_subscribers(cred, -1); put_cred(cred); - - cred = (struct cred *) tsk->replacement_session_keyring; - if (cred) { - tsk->replacement_session_keyring = NULL; - validate_creds(cred); - put_cred(cred); - } } /** @@ -386,8 +379,6 @@ int copy_creds(struct task_struct *p, unsigned long clone_flags) struct cred *new; int ret; - p->replacement_session_keyring = NULL; - if ( #ifdef CONFIG_KEYS !p->cred->thread_keyring && -- 2.39.5