diff options
author | Linus Torvalds <torvalds@g5.osdl.org> | 2005-12-24 12:32:55 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-12-24 12:32:55 -0800 |
commit | 10bb10dcb685cbe078e611f2dca3bd3e42fba0a8 (patch) | |
tree | 79303391de7ed61a5c55b3599e386ee062e758ea /drivers | |
parent | 3bf395994da5c238c37e281b50a5dd5f2532dc0c (diff) | |
parent | e445ee65cbefaa19131c972ae7fe221c95cf4cc4 (diff) | |
download | linux-10bb10dcb685cbe078e611f2dca3bd3e42fba0a8.tar.gz linux-10bb10dcb685cbe078e611f2dca3bd3e42fba0a8.tar.bz2 linux-10bb10dcb685cbe078e611f2dca3bd3e42fba0a8.zip |
Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/video/sbuslib.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/video/sbuslib.c b/drivers/video/sbuslib.c index 646c43f921c5..3a74a63dd4f2 100644 --- a/drivers/video/sbuslib.c +++ b/drivers/video/sbuslib.c @@ -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; |