diff options
author | Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> | 2016-11-14 20:12:55 +0900 |
---|---|---|
committer | Casey Schaufler <casey@schaufler-ca.com> | 2016-11-14 12:55:11 -0800 |
commit | 8c15d66e429afd099b66f05393527c23f85ca41c (patch) | |
tree | dda9eea10b14612ff26af6c671efddfc113810f8 /security/smack/smack_lsm.c | |
parent | 2e4939f7026f938a1dc81533d020801198562804 (diff) | |
download | blackbird-op-linux-8c15d66e429afd099b66f05393527c23f85ca41c.tar.gz blackbird-op-linux-8c15d66e429afd099b66f05393527c23f85ca41c.zip |
Smack: Use GFP_KERNEL for smack_parse_opts_str().
Since smack_parse_opts_str() is calling match_strdup() which uses
GFP_KERNEL, it is safe to use GFP_KERNEL from kcalloc() which is
called by smack_parse_opts_str().
Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Acked-by: Casey Schaufler <casey@schaufler-ca.com>
Diffstat (limited to 'security/smack/smack_lsm.c')
-rw-r--r-- | security/smack/smack_lsm.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/security/smack/smack_lsm.c b/security/smack/smack_lsm.c index b2c839f735c0..46d8be434466 100644 --- a/security/smack/smack_lsm.c +++ b/security/smack/smack_lsm.c @@ -692,12 +692,12 @@ static int smack_parse_opts_str(char *options, } } - opts->mnt_opts = kcalloc(NUM_SMK_MNT_OPTS, sizeof(char *), GFP_ATOMIC); + opts->mnt_opts = kcalloc(NUM_SMK_MNT_OPTS, sizeof(char *), GFP_KERNEL); if (!opts->mnt_opts) goto out_err; opts->mnt_opts_flags = kcalloc(NUM_SMK_MNT_OPTS, sizeof(int), - GFP_ATOMIC); + GFP_KERNEL); if (!opts->mnt_opts_flags) { kfree(opts->mnt_opts); goto out_err; |