From: Oleg Nesterov <oleg@redhat.com>
To: Andrew Morton <akpm@linux-foundation.org>,
David Howells <dhowells@redhat.com>,
Linus Torvalds <torvalds@linux-foundation.org>,
Thomas Gleixner <tglx@linutronix.de>
Cc: Alexander Gordeev <agordeev@redhat.com>,
Chris Zankel <chris@zankel.net>, David Smith <dsmith@redhat.com>,
"Frank Ch. Eigler" <fche@redhat.com>,
Geert Uytterhoeven <geert@linux-m68k.org>,
Larry Woodman <lwoodman@redhat.com>,
Peter Zijlstra <peterz@infradead.org>,
Richard Kuo <rkuo@codeaurora.org>, Tejun Heo <tj@kernel.org>,
linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH v6 6/6] keys: kill task_struct->replacement_session_keyring
Date: Fri, 20 Apr 2012 01:16:16 +0200 [thread overview]
Message-ID: <20120419231616.GF15828@redhat.com> (raw)
In-Reply-To: <20120419231431.GA15820@redhat.com>
Kill the no longer used task_struct->replacement_session_keyring,
update copy_creds() and exit_creds().
Signed-off-by: Oleg Nesterov <oleg@redhat.com>
---
include/linux/sched.h | 2 --
kernel/cred.c | 9 ---------
2 files changed, 0 insertions(+), 11 deletions(-)
diff --git a/include/linux/sched.h b/include/linux/sched.h
index e36edfb..ac04a02 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -1402,8 +1402,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 e70683d..9570736 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 &&
--
1.5.5.1
next prev parent reply other threads:[~2012-04-19 23:16 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-19 23:14 [PATCH v6 0/6] task_work_add: generic process-context callbacks Oleg Nesterov
2012-04-19 23:14 ` [PATCH v6 1/6] " Oleg Nesterov
2012-04-20 8:48 ` David Howells
2012-04-19 23:15 ` [PATCH v6 2/6] genirq: reimplement exit_irq_thread() hook via task_work_add() Oleg Nesterov
2012-04-19 23:15 ` [PATCH v6 3/6] hexagon: do_notify_resume() needs tracehook_notify_resume() Oleg Nesterov
2012-04-20 0:24 ` Richard Kuo
2012-04-19 23:15 ` [PATCH v6 4/6] keys: change keyctl_session_to_parent() to use task_work_add() Oleg Nesterov
2012-04-20 8:45 ` David Howells
2012-04-19 23:16 ` [PATCH v6 5/6] keys: kill the dummy key_replace_session_keyring() Oleg Nesterov
2012-04-20 8:45 ` David Howells
2012-04-19 23:16 ` Oleg Nesterov [this message]
2012-04-20 8:45 ` [PATCH v6 6/6] keys: kill task_struct->replacement_session_keyring David Howells
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20120419231616.GF15828@redhat.com \
--to=oleg@redhat.com \
--cc=agordeev@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=chris@zankel.net \
--cc=dhowells@redhat.com \
--cc=dsmith@redhat.com \
--cc=fche@redhat.com \
--cc=geert@linux-m68k.org \
--cc=linux-arch@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lwoodman@redhat.com \
--cc=peterz@infradead.org \
--cc=rkuo@codeaurora.org \
--cc=tglx@linutronix.de \
--cc=tj@kernel.org \
--cc=torvalds@linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.