summaryrefslogtreecommitdiffstats
path: root/security
diff options
context:
space:
mode:
authorJames Morris <james.l.morris@oracle.com>2017-04-19 08:35:01 +1000
committerJames Morris <james.l.morris@oracle.com>2017-04-19 08:35:01 +1000
commit6859e21e816d8c97a0f3af6162d5ada145e6821d (patch)
tree5ceacb2ce2194d67c0614f9b72ebbc6739fb76cc /security
parentfa5b5b26e25cbab819e0955f948e8a6d5363f06f (diff)
parentaf96f0d6394a0af59c4dd71d6bcd3b1ddfba5196 (diff)
downloadlinux-6859e21e816d8c97a0f3af6162d5ada145e6821d.tar.gz
linux-6859e21e816d8c97a0f3af6162d5ada145e6821d.tar.bz2
linux-6859e21e816d8c97a0f3af6162d5ada145e6821d.zip
Merge branch 'smack-for-4.12' of git://github.com/cschaufler/smack-next into next
Diffstat (limited to 'security')
-rw-r--r--security/smack/smack_access.c2
-rw-r--r--security/smack/smack_lsm.c4
2 files changed, 2 insertions, 4 deletions
diff --git a/security/smack/smack_access.c b/security/smack/smack_access.c
index 356e3764cad9..a4b2e6b94abd 100644
--- a/security/smack/smack_access.c
+++ b/security/smack/smack_access.c
@@ -504,7 +504,7 @@ int smk_netlbl_mls(int level, char *catset, struct netlbl_lsm_secattr *sap,
if ((m & *cp) == 0)
continue;
rc = netlbl_catmap_setbit(&sap->attr.mls.cat,
- cat, GFP_ATOMIC);
+ cat, GFP_KERNEL);
if (rc < 0) {
netlbl_catmap_free(sap->attr.mls.cat);
return rc;
diff --git a/security/smack/smack_lsm.c b/security/smack/smack_lsm.c
index 927e60e622d1..658f5d8c7e76 100644
--- a/security/smack/smack_lsm.c
+++ b/security/smack/smack_lsm.c
@@ -695,10 +695,8 @@ static int smack_parse_opts_str(char *options,
opts->mnt_opts_flags = kcalloc(NUM_SMK_MNT_OPTS, sizeof(int),
GFP_KERNEL);
- if (!opts->mnt_opts_flags) {
- kfree(opts->mnt_opts);
+ if (!opts->mnt_opts_flags)
goto out_err;
- }
if (fsdefault) {
opts->mnt_opts[num_mnt_opts] = fsdefault;