aboutsummaryrefslogtreecommitdiffstats
path: root/security/selinux/hooks.c
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2015-08-27 20:30:46 +0100
committerMark Brown <broonie@kernel.org>2015-08-27 20:30:46 +0100
commit2002e90412df17ef7f714be62ed96a3c80b2f907 (patch)
tree3dd03684f7436320ec64f9c702b5d057a25dca17 /security/selinux/hooks.c
parent02a9547e9b3f10d73fde66f52fc8b2a375a300cd (diff)
parent3b7ce99748f0d006f9d1aa85709872e7b46787f7 (diff)
downloadkernel_replicant_linux-2002e90412df17ef7f714be62ed96a3c80b2f907.tar.gz
kernel_replicant_linux-2002e90412df17ef7f714be62ed96a3c80b2f907.tar.bz2
kernel_replicant_linux-2002e90412df17ef7f714be62ed96a3c80b2f907.zip
Merge branch 'topic/ics43432' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-gtm601
Diffstat (limited to 'security/selinux/hooks.c')
-rw-r--r--security/selinux/hooks.c3
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.