summaryrefslogtreecommitdiff
path: root/security
diff options
context:
space:
mode:
authorAlex Shi <alex.shi@linaro.org>2016-12-06 13:01:29 +0800
committerAlex Shi <alex.shi@linaro.org>2016-12-06 13:01:29 +0800
commitbdcf7d8df4cfa7f99423da161019b964f7ce2520 (patch)
tree7496c94119c57f9987703bb0a4f13997f911ddc1 /security
parenta8575ee86e3ec89dde405193d61a6c0a958308cf (diff)
parent3ba1692e7239293d7bc5a596ca9b0707f5bc07d5 (diff)
Merge branch 'linux-linaro-lsk-v4.4' into linux-linaro-lsk-v4.4-android
Conflicts: keep low scan freq in android in net/wireless/scan.c
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;