aboutsummaryrefslogtreecommitdiff
path: root/security/keys/process_keys.c
diff options
context:
space:
mode:
Diffstat (limited to 'security/keys/process_keys.c')
-rw-r--r--security/keys/process_keys.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/security/keys/process_keys.c b/security/keys/process_keys.c
index c9b07c97d7f..54339cfd673 100644
--- a/security/keys/process_keys.c
+++ b/security/keys/process_keys.c
@@ -834,13 +834,11 @@ error:
* Replace a process's session keyring on behalf of one of its children when
* the target process is about to resume userspace execution.
*/
-void key_change_session_keyring(struct task_work *twork)
+void key_change_session_keyring(struct callback_head *twork)
{
const struct cred *old = current_cred();
- struct kludge *p = container_of(twork, struct kludge, twork);
- struct cred *new = p->cred;
+ struct cred *new = container_of(twork, struct cred, rcu);
- kfree(p);
if (unlikely(current->flags & PF_EXITING)) {
put_cred(new);
return;