]> nv-tegra.nvidia Code Review - linux-2.6.git/commitdiff
Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6
authorLinus Torvalds <torvalds@g5.osdl.org>
Sat, 24 Dec 2005 20:32:55 +0000 (12:32 -0800)
committerLinus Torvalds <torvalds@g5.osdl.org>
Sat, 24 Dec 2005 20:32:55 +0000 (12:32 -0800)
drivers/video/sbuslib.c

index 646c43f921c55b3bc0774fecbd92cb38778b3b33..3a74a63dd4f228a4cb0691d24d796b65b25348d9 100644 (file)
@@ -46,6 +46,9 @@ int sbusfb_mmap_helper(struct sbus_mmap_map *map,
        unsigned long off;
        int i;
                                         
+       if (!(vma->vm_flags & (VM_SHARED | VM_MAYSHARE)))
+               return -EINVAL;
+
        size = vma->vm_end - vma->vm_start;
        if (vma->vm_pgoff > (~0UL >> PAGE_SHIFT))
                return -EINVAL;