summaryrefslogtreecommitdiff
path: root/security
diff options
context:
space:
mode:
authorAlex Shi <alex.shi@linaro.org>2016-12-05 12:01:22 +0800
committerAlex Shi <alex.shi@linaro.org>2016-12-05 12:01:22 +0800
commit3ba1692e7239293d7bc5a596ca9b0707f5bc07d5 (patch)
treee0a4ceba15a5ba39da4b3decc2e78a6754afc5ad /security
parent072c0f9ee4023f380774186c8cb95c0118d2f8dc (diff)
parent87c6c6ef5b17bfed9226f1307435910626817ebb (diff)
Merge tag 'v4.4.36' into linux-linaro-lsk-v4.4
This is the 4.4.36 stable release
Diffstat (limited to 'security')
-rw-r--r--security/apparmor/domain.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/security/apparmor/domain.c b/security/apparmor/domain.c
index dc0027b28b04..53426a6ee6dc 100644
--- a/security/apparmor/domain.c
+++ b/security/apparmor/domain.c
@@ -623,8 +623,8 @@ int aa_change_hat(const char *hats[], int count, u64 token, bool permtest)
/* released below */
cred = get_current_cred();
cxt = cred_cxt(cred);
- profile = aa_cred_profile(cred);
- previous_profile = cxt->previous;
+ profile = aa_get_newest_profile(aa_cred_profile(cred));
+ previous_profile = aa_get_newest_profile(cxt->previous);
if (unconfined(profile)) {
info = "unconfined";
@@ -720,6 +720,8 @@ audit:
out:
aa_put_profile(hat);
kfree(name);
+ aa_put_profile(profile);
+ aa_put_profile(previous_profile);
put_cred(cred);
return error;