Commit 8931c3bd authored by Tetsuo Handa's avatar Tetsuo Handa Committed by Paul Moore

SELinux: Use GFP_KERNEL for selinux_parse_opts_str().

Since selinux_parse_opts_str() is calling match_strdup() which uses
GFP_KERNEL, it is safe to use GFP_KERNEL from kcalloc() which is
called by selinux_parse_opts_str().
Signed-off-by: default avatarTetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Signed-off-by: default avatarPaul Moore <paul@paul-moore.com>
parent 07d9a380
...@@ -1100,11 +1100,12 @@ static int selinux_parse_opts_str(char *options, ...@@ -1100,11 +1100,12 @@ static int selinux_parse_opts_str(char *options,
} }
rc = -ENOMEM; rc = -ENOMEM;
opts->mnt_opts = kcalloc(NUM_SEL_MNT_OPTS, sizeof(char *), GFP_ATOMIC); opts->mnt_opts = kcalloc(NUM_SEL_MNT_OPTS, sizeof(char *), GFP_KERNEL);
if (!opts->mnt_opts) if (!opts->mnt_opts)
goto out_err; goto out_err;
opts->mnt_opts_flags = kcalloc(NUM_SEL_MNT_OPTS, sizeof(int), GFP_ATOMIC); opts->mnt_opts_flags = kcalloc(NUM_SEL_MNT_OPTS, sizeof(int),
GFP_KERNEL);
if (!opts->mnt_opts_flags) { if (!opts->mnt_opts_flags) {
kfree(opts->mnt_opts); kfree(opts->mnt_opts);
goto out_err; goto out_err;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment