merge task_work and rcu_head, get rid of separate allocation for keyring case
task_work and rcu_head are identical now; merge them (calling the result struct callback_head, rcu_head #define'd to it), kill separate allocation in security/keys since we can just use cred->rcu now. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user