aboutsummaryrefslogtreecommitdiffstats
path: root/ipc
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@g5.osdl.org>2006-04-17 17:44:17 -0700
committerLinus Torvalds <torvalds@g5.osdl.org>2006-04-17 17:44:17 -0700
commitde542925fbf179fb4b39bab2c3235b4525f96794 (patch)
tree11b0f8baf2469c52405ab9be9f82c414c3de64b4 /ipc
parent[SPARC64]: Export pcibios_resource_to_bus(). (diff)
parent[PATCH] shmat: stop mprotect from giving write permission to a readonly attachment (CVE-2006-1524) (diff)
downloadlinux-dev-de542925fbf179fb4b39bab2c3235b4525f96794.tar.xz
linux-dev-de542925fbf179fb4b39bab2c3235b4525f96794.zip
Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/stable-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/gregkh/stable-2.6: [PATCH] shmat: stop mprotect from giving write permission to a readonly attachment (CVE-2006-1524) [PATCH] cciss: bug fix for crash when running hpacucli [PATCH] ext3: Fix missed mutex unlock [PATCH] Fix block device symlink name [PATCH] isd200: limit to BLK_DEV_IDE
Diffstat (limited to 'ipc')
-rw-r--r--ipc/shm.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/ipc/shm.c b/ipc/shm.c
index 6b0c9af5bbf7..1c2faf62bc73 100644
--- a/ipc/shm.c
+++ b/ipc/shm.c
@@ -162,6 +162,8 @@ static int shm_mmap(struct file * file, struct vm_area_struct * vma)
ret = shmem_mmap(file, vma);
if (ret == 0) {
vma->vm_ops = &shm_vm_ops;
+ if (!(vma->vm_flags & VM_WRITE))
+ vma->vm_flags &= ~VM_MAYWRITE;
shm_inc(file->f_dentry->d_inode->i_ino);
}