diff options
author | John Johansen <john.johansen@canonical.com> | 2017-06-09 12:08:28 +0300 |
---|---|---|
committer | John Johansen <john.johansen@canonical.com> | 2017-06-11 03:11:34 +0300 |
commit | cf797c0e5e312520b0b9f0367039fc0279a07a76 (patch) | |
tree | 68dc51534745fb230ec35e1d56bb158fb99b225b /security/apparmor/context.c | |
parent | fe864821d504f33f22b3ce2d5599ae95598db721 (diff) | |
download | linux-cf797c0e5e312520b0b9f0367039fc0279a07a76.tar.xz |
apparmor: convert to profile block critical sections
There are still a few places where profile replacement fails to update
and a stale profile is used for mediation. Fix this by moving to
accessing the current label through a critical section that will
always ensure mediation is using the current label regardless of
whether the tasks cred has been updated or not.
Signed-off-by: John Johansen <john.johansen@canonical.com>
Diffstat (limited to 'security/apparmor/context.c')
-rw-r--r-- | security/apparmor/context.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/security/apparmor/context.c b/security/apparmor/context.c index 1fc16b88efbf..410b9f7f68a1 100644 --- a/security/apparmor/context.c +++ b/security/apparmor/context.c @@ -79,7 +79,7 @@ struct aa_profile *aa_get_task_profile(struct task_struct *task) struct aa_profile *p; rcu_read_lock(); - p = aa_get_profile(__aa_task_profile(task)); + p = aa_get_newest_profile(__aa_task_raw_profile(task)); rcu_read_unlock(); return p; |