diff options
author | Mark Brown <broonie@kernel.org> | 2015-07-24 18:29:31 +0100 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2015-07-24 18:29:31 +0100 |
commit | 41dae91a7206d9a09047f3d376282bba4d9545b5 (patch) | |
tree | fe12449256757eea6c14d7d041cc494b712e83ba /security/selinux/hooks.c | |
parent | 5d506a5ad4155e813d254d2f02ce17b58045423c (diff) | |
parent | 3a003baeec246f604ed1d2e0087560d7f15edcc6 (diff) |
Merge branch 'topic/ocp' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator into regulator-qcom-spmi
Diffstat (limited to 'security/selinux/hooks.c')
-rw-r--r-- | security/selinux/hooks.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c index 623108199641..564079c5c49d 100644 --- a/security/selinux/hooks.c +++ b/security/selinux/hooks.c @@ -3283,7 +3283,8 @@ static int file_map_prot_check(struct file *file, unsigned long prot, int shared int rc = 0; if (default_noexec && - (prot & PROT_EXEC) && (!file || (!shared && (prot & PROT_WRITE)))) { + (prot & PROT_EXEC) && (!file || IS_PRIVATE(file_inode(file)) || + (!shared && (prot & PROT_WRITE)))) { /* * We are making executable an anonymous mapping or a * private file mapping that will also be writable. |