diff options
author | Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> | 2016-11-14 12:12:56 +0100 |
---|---|---|
committer | Casey Schaufler <casey@schaufler-ca.com> | 2017-04-05 00:41:15 +0200 |
commit | af96f0d6394a0af59c4dd71d6bcd3b1ddfba5196 (patch) | |
tree | b919dfda7beba06d3dd7a7ee74d40ea6c683bd0b /security | |
parent | smack: fix double free in smack_parse_opts_str() (diff) | |
download | linux-af96f0d6394a0af59c4dd71d6bcd3b1ddfba5196.tar.xz linux-af96f0d6394a0af59c4dd71d6bcd3b1ddfba5196.zip |
Smack: Use GFP_KERNEL for smk_netlbl_mls().
Since all callers of smk_netlbl_mls() are GFP_KERNEL context
(smk_set_cipso() calls memdup_user_nul(), init_smk_fs() calls
__kernfs_new_node(), smk_import_entry() calls kzalloc(GFP_KERNEL)),
it is safe to use GFP_KERNEL from netlbl_catmap_setbit().
Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Signed-off-by: Casey Schaufler <casey@schaufler-ca.com>
Diffstat (limited to 'security')
-rw-r--r-- | security/smack/smack_access.c | 2 |
1 files changed, 1 insertions, 1 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; |