Skip to content

Commit

Permalink
Smack: Use GFP_KERNEL for smk_netlbl_mls().
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Tetsuo Handa authored and Casey Schaufler committed Apr 4, 2017
1 parent c3c8dc9 commit af96f0d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion security/smack/smack_access.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit af96f0d

Please sign in to comment.