Commit 69b6d710 authored by Casey Schaufler's avatar Casey Schaufler

Smack: use init_task_smack() in smack_cred_transfer()

smack_cred_transfer() open codes the same initialization
as init_task_smack(). Remove the open coding and replace it
with a call to init_task_smack().
Signed-off-by: default avatarCasey Schaufler <casey@schaufler-ca.com>
parent f0816d43
...@@ -2101,12 +2101,7 @@ static void smack_cred_transfer(struct cred *new, const struct cred *old) ...@@ -2101,12 +2101,7 @@ static void smack_cred_transfer(struct cred *new, const struct cred *old)
struct task_smack *old_tsp = smack_cred(old); struct task_smack *old_tsp = smack_cred(old);
struct task_smack *new_tsp = smack_cred(new); struct task_smack *new_tsp = smack_cred(new);
new_tsp->smk_task = old_tsp->smk_task; init_task_smack(new_tsp, old_tsp->smk_task, old_tsp->smk_task);
new_tsp->smk_forked = old_tsp->smk_task;
mutex_init(&new_tsp->smk_rules_lock);
INIT_LIST_HEAD(&new_tsp->smk_rules);
/* cbs copy rule list */
} }
/** /**
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment