aboutsummaryrefslogtreecommitdiffstats
path: root/security/smack/smack.h
diff options
context:
space:
mode:
Diffstat (limited to 'security/smack/smack.h')
-rw-r--r--security/smack/smack.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/security/smack/smack.h b/security/smack/smack.h
index 7629eaeb1fb2..67ccb7b2b89b 100644
--- a/security/smack/smack.h
+++ b/security/smack/smack.h
@@ -299,6 +299,16 @@ static inline struct smack_known *smk_of_task(const struct task_smack *tsp)
299 return tsp->smk_task; 299 return tsp->smk_task;
300} 300}
301 301
302static inline struct smack_known *smk_of_task_struct(const struct task_struct *t)
303{
304 struct smack_known *skp;
305
306 rcu_read_lock();
307 skp = smk_of_task(__task_cred(t)->security);
308 rcu_read_unlock();
309 return skp;
310}
311
302/* 312/*
303 * Present a pointer to the forked smack label entry in an task blob. 313 * Present a pointer to the forked smack label entry in an task blob.
304 */ 314 */